diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 8c2da30d946b36..13c8ba38c9bc81 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -15,102 +15,121 @@ name: Build example - EFR32 on: - push: - pull_request: + push: + pull_request: concurrency: - group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true jobs: - efr32: - name: EFR32 - timeout-minutes: 60 + efr32: + name: EFR32 + timeout-minutes: 60 - env: - EFR32_BOARD: BRD4161A - BUILD_TYPE: gn_efr32 + env: + EFR32_BOARD: BRD4161A + BUILD_TYPE: gn_efr32 + + runs-on: ubuntu-latest + if: github.actor != 'restyled-io[bot]' + + container: + image: connectedhomeip/chip-build-efr32:0.5.79 + volumes: + - "/tmp/bloat_reports:/tmp/bloat_reports" + steps: + - uses: Wandalen/wretry.action@v1.0.15 + name: Checkout + with: + action: actions/checkout@v3 + with: | + token: ${{ github.token }} + attempt_limit: 3 + attempt_delay: 2000 + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform efr32 - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' + - name: Install git-lfs # Temporary measure untill docker container is updated + run: + "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash; \ + apt-get install git-lfs; \ + git lfs install;" - container: - image: connectedhomeip/chip-build-efr32:0.5.79 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - steps: - - uses: Wandalen/wretry.action@v1.0.15 - name: Checkout - with: - action: actions/checkout@v3 - with: | - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - name: Checkout submodules - run: scripts/checkout_submodules.py --shallow --platform efr32 + - name: Create LFS file hash list + run: git -C third_party/silabs/gecko_sdk lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id - - name: Set up environment for size reports - if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" + - name: Restore gecko_sdk LFS cache + uses: actions/cache@v2 + id: lfs-cache + with: + path: .git/modules/third_party/silabs/gecko_sdk/lfs + key: lfs-${{ hashFiles('.lfs-assets-id') }} + + - name: Git LFS Pull + run: git -C third_party/silabs/gecko_sdk lfs pull + + - name: Set up environment for size reports + if: ${{ !env.ACT }} + env: + GH_CONTEXT: ${{ toJson(github) }} + run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - name: Bootstrap - timeout-minutes: 25 - run: scripts/build/gn_bootstrap.sh - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 - if: ${{ always() }} && ${{ !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log + - name: Bootstrap + timeout-minutes: 25 + run: scripts/build/gn_bootstrap.sh + - name: Uploading bootstrap logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} && ${{ !env.ACT }} + with: + name: bootstrap-logs + path: | + .environment/gn_out/.ninja_log + .environment/pigweed-venv/*.log - - name: Build some BRD4161A variants - timeout-minutes: 50 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --enable-flashbundle \ - --target-glob '*-brd4161a-{lock,light,switch,window-covering,unit-test}' \ - build \ - --copy-artifacts-to out/artifacts \ - " - - name: Prepare some bloat report from the previous builds - run: | - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - efr32 BRD4161A lighting-app \ - out/efr32-brd4161a-light/chip-efr32-lighting-example.out \ - /tmp/bloat_reports/ - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - efr32 BRD4161A window-app \ - out/efr32-brd4161a-window-covering/chip-efr32-window-example.out \ - /tmp/bloat_reports/ - - name: Build example EFR32 Lighting App for BRD4161A with RPCs - timeout-minutes: 10 - run: | - scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A \ - 'import("//with_pw_rpc.gni")' - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \ - out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ - - name: Build example EFR32+WF200 WiFi Lock app for BRD4161A - timeout-minutes: 10 - run: | - scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_wifi_wf200 BRD4161A is_debug=false --wifi wf200 - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \ - out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/ - - name: Build example EFR32+RS911x WiFi Lighting app for BRD4161A - timeout-minutes: 10 - run: | - scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs911x lighting-app \ - out/lighting_app_wifi_rs911x/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ - - name: Uploading Size Reports - uses: actions/upload-artifact@v2 - if: ${{ !env.ACT }} - with: - name: Size,EFR32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ + - name: Build some BRD4161A variants + timeout-minutes: 50 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target-glob '*-brd4161a-{lock,light,switch,window-covering,unit-test}' \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare some bloat report from the previous builds + run: | + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + efr32 BRD4161A lighting-app \ + out/efr32-brd4161a-light/chip-efr32-lighting-example.out \ + /tmp/bloat_reports/ + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + efr32 BRD4161A window-app \ + out/efr32-brd4161a-window-covering/chip-efr32-window-example.out \ + /tmp/bloat_reports/ + - name: Build example EFR32 Lighting App for BRD4161A with RPCs + timeout-minutes: 10 + run: | + scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A \ + 'import("//with_pw_rpc.gni")' + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \ + out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ + - name: Build example EFR32+WF200 WiFi Lock app for BRD4161A + timeout-minutes: 10 + run: | + scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/ out/lock_app_wifi_wf200 BRD4161A is_debug=false --wifi wf200 + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \ + out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/ + - name: Build example EFR32+RS911x WiFi Lighting app for BRD4161A + timeout-minutes: 10 + run: | + scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_wifi_rs911x BRD4161A --wifi rs911x + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs911x lighting-app \ + out/lighting_app_wifi_rs911x/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/ + - name: Uploading Size Reports + uses: actions/upload-artifact@v2 + if: ${{ !env.ACT }} + with: + name: Size,EFR32-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} + path: | + /tmp/bloat_reports/ diff --git a/.gitmodules b/.gitmodules index 0682becb54cfce..51153d1ee5cd62 100644 --- a/.gitmodules +++ b/.gitmodules @@ -63,11 +63,6 @@ url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git branch = V10.3.1-kernel-only platforms = ameba,cc13x2_26x2,bl602,efr32,esp32,k32w0,p6,qpg -[submodule "efr32_sdk"] - path = third_party/efr32_sdk/repo - url = https://github.com/SiliconLabs/sdk_support.git - branch = master - platforms = efr32 [submodule "simw-top-mini"] path = third_party/simw-top-mini/repo url = https://github.com/NXP/plug-and-trust.git @@ -237,10 +232,6 @@ url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git branch = main platforms = cc13x2_26x2 -[submodule "third_party/efr32_sdk/wiseconnect-wifi-bt-sdk"] - path = third_party/efr32_sdk/wiseconnect-wifi-bt-sdk - url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk - platforms = efr32 [submodule "third_party/bouffalolab/bl602"] path = third_party/bouffalolab/bl602_sdk/repo url = https://github.com/bouffalolab/bl_iot_sdk_matter.git @@ -251,3 +242,18 @@ url = https://github.com/NXPmicro/mbedtls.git branch = tinycrypt-mbedtls-2.28 platforms = k32w0 +[submodule "third_party/silabs/matter_support"] + path = third_party/silabs/matter_support + url = https://github.com/SiliconLabs/sdk_support.git + branch = main + platforms = efr32 +[submodule "third_party/silabs/gecko_sdk"] + path = third_party/silabs/gecko_sdk + url = https://github.com/SiliconLabs/gecko_sdk.git + branch = gsdk_4.1 + platforms = efr32 +[submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"] + path = third_party/silabs/wiseconnect-wifi-bt-sdk + url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git + branch = master + platforms = efr32 diff --git a/build_overrides/efr32_sdk.gni b/build_overrides/efr32_sdk.gni index dda4d4d2735d4b..4a7344b4c7ebed 100644 --- a/build_overrides/efr32_sdk.gni +++ b/build_overrides/efr32_sdk.gni @@ -14,5 +14,5 @@ declare_args() { # Root directory for efr32 SDK build files. - efr32_sdk_build_root = "//third_party/efr32_sdk" + efr32_sdk_build_root = "//third_party/silabs" } diff --git a/examples/build_overrides/efr32_sdk.gni b/examples/build_overrides/efr32_sdk.gni index bd96dcbd8855b4..d5a35449d9ffd0 100644 --- a/examples/build_overrides/efr32_sdk.gni +++ b/examples/build_overrides/efr32_sdk.gni @@ -14,5 +14,5 @@ declare_args() { # Root directory for erf32 SDK. - efr32_sdk_build_root = "//third_party/connectedhomeip/third_party/efr32_sdk" + efr32_sdk_build_root = "//third_party/connectedhomeip/third_party/silabs" } diff --git a/examples/light-switch-app/efr32/BUILD.gn b/examples/light-switch-app/efr32/BUILD.gn index 402faaeca9a70c..7d870ecd737eb0 100644 --- a/examples/light-switch-app/efr32/BUILD.gn +++ b/examples/light-switch-app/efr32/BUILD.gn @@ -89,7 +89,7 @@ if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { # WiFi settings if (chip_enable_wifi) { - wifi_sdk_dir = "${chip_root}/third_party/efr32_sdk/repo/matter/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", @@ -102,7 +102,7 @@ if (chip_enable_wifi) { if (use_rs911x) { wiseconnect_sdk_root = - "${chip_root}/third_party/efr32_sdk/wiseconnect-wifi-bt-sdk" + "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" import("${wifi_sdk_dir}/rs911x/rs911x.gni") } else { import("${wifi_sdk_dir}/wf200/wf200.gni") diff --git a/examples/lighting-app/efr32/BUILD.gn b/examples/lighting-app/efr32/BUILD.gn index 341582d0287321..192833797494b2 100644 --- a/examples/lighting-app/efr32/BUILD.gn +++ b/examples/lighting-app/efr32/BUILD.gn @@ -89,7 +89,7 @@ if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { # WiFi settings if (chip_enable_wifi) { - wifi_sdk_dir = "${chip_root}/third_party/efr32_sdk/repo/matter/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", @@ -102,7 +102,7 @@ if (chip_enable_wifi) { if (use_rs911x) { wiseconnect_sdk_root = - "${chip_root}/third_party/efr32_sdk/wiseconnect-wifi-bt-sdk" + "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" import("${wifi_sdk_dir}/rs911x/rs911x.gni") } else { import("${wifi_sdk_dir}/wf200/wf200.gni") diff --git a/examples/lock-app/efr32/BUILD.gn b/examples/lock-app/efr32/BUILD.gn index 50ebd01f436152..679ed1f46cda3d 100644 --- a/examples/lock-app/efr32/BUILD.gn +++ b/examples/lock-app/efr32/BUILD.gn @@ -89,7 +89,7 @@ if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { # WiFi settings if (chip_enable_wifi) { - wifi_sdk_dir = "${chip_root}/third_party/efr32_sdk/repo/matter/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", @@ -102,7 +102,7 @@ if (chip_enable_wifi) { if (use_rs911x) { wiseconnect_sdk_root = - "${chip_root}/third_party/efr32_sdk/wiseconnect-wifi-bt-sdk" + "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" import("${wifi_sdk_dir}/rs911x/rs911x.gni") } else { import("${wifi_sdk_dir}/wf200/wf200.gni") diff --git a/examples/platform/efr32/ldscripts/efr32mg12.ld b/examples/platform/efr32/ldscripts/efr32mg12.ld index 0851b5ffdf6a60..042f5f50a2a430 100644 --- a/examples/platform/efr32/ldscripts/efr32mg12.ld +++ b/examples/platform/efr32/ldscripts/efr32mg12.ld @@ -17,10 +17,9 @@ */ /***************************************************************************//** * Linker script for Silicon Labs EFR32MG12P devices - * @version 5.7.2 ******************************************************************************* * # License - * Copyright 2018 Silicon Laboratories Inc. www.silabs.com + * Copyright 2022 Silicon Laboratories Inc. www.silabs.com ******************************************************************************* * * SPDX-License-Identifier: Zlib @@ -45,6 +44,7 @@ * ******************************************************************************/ + MEMORY { FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 1048576 @@ -81,8 +81,6 @@ MEMORY * __StackLimit * __StackTop * __stack - * __Vectors_End - * __Vectors_Size */ ENTRY(Reset_Handler) @@ -91,21 +89,12 @@ SECTIONS .text : { KEEP(*(.vectors)) - __Vectors_End = .; - __Vectors_Size = __Vectors_End - __Vectors; - __end__ = .; *(.text*) KEEP(*(.init)) KEEP(*(.fini)) - KEEP(*(.application_properties)) - KEEP(*(.gecko_configuration)) - KEEP(*(.xo_configuration)) - KEEP(*(.gatt_header)) - KEEP(*(.gatt_data)) - /* .ctors */ *crtbegin.o(.ctors) *crtbegin?.o(.ctors) @@ -122,11 +111,9 @@ SECTIONS *(.rodata*) - KEEP(*(.eh_frame*)) } > FLASH - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) @@ -139,44 +126,26 @@ SECTIONS } > FLASH __exidx_end = .; - - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* .copy.table : { . = ALIGN(4); __copy_table_start__ = .; + LONG (__etext) LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) + LONG ((__data_end__ - __data_start__) / 4) + __copy_table_end__ = .; } > FLASH - */ - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* .zero.table : { . = ALIGN(4); __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) __zero_table_end__ = .; } > FLASH - */ - - __etext = .; + __etext = ALIGN (4); .data : AT (__etext) { @@ -219,13 +188,14 @@ SECTIONS { . = ALIGN(4); __bss_start__ = .; - *(.bss*) + *(.bss) + *(.bss.*) *(COMMON) . = ALIGN(4); __bss_end__ = .; } > RAM - .heap (COPY): + .heap (COPY) : { __HeapBase = .; __end__ = .; @@ -240,7 +210,7 @@ SECTIONS /* .stack_dummy section doesn't contains any symbols. It is only * used for linker to calculate size of stack sections, and assign * values to stack symbols later */ - .stack_dummy (COPY): + .stack_dummy (COPY): { KEEP(*(.stack*)) } > RAM diff --git a/examples/platform/efr32/ldscripts/efr32mg24.ld b/examples/platform/efr32/ldscripts/efr32mg24.ld index 7b19dbea1bc03f..cac2b08a2b1371 100644 --- a/examples/platform/efr32/ldscripts/efr32mg24.ld +++ b/examples/platform/efr32/ldscripts/efr32mg24.ld @@ -16,11 +16,14 @@ * limitations under the License. */ /***************************************************************************//** - * @file + * @file gcc_EFR32MG24.ld + * @brief GNU Linker Script for Cortex-M based device + * @version V2.2.0 + * @date 16. December 2020 * Linker script for Silicon Labs EFR32MG24 devices ******************************************************************************* * # License - * Copyright 2021 Silicon Laboratories, Inc. www.silabs.com + * Copyright 2022 Silicon Laboratories, Inc. www.silabs.com ******************************************************************************* * * SPDX-License-Identifier: Zlib @@ -45,11 +48,11 @@ * ******************************************************************************/ - MEMORY - { - FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 0x178000 - RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000 - } +MEMORY +{ + FLASH (rx) : ORIGIN = 0x08006000, LENGTH = 0x178000 + RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 0x40000 +} /* Linker script to place sections and symbol values. Should be used together * with other linker script that defines memory regions FLASH and RAM. @@ -76,14 +79,13 @@ * __bss_end__ * __end__ * end - * __HeapBase * __HeapLimit * __StackLimit * __StackTop * __stack - * __Vectors_End - * __Vectors_Size + * __StackSeal (only if ARMv8-M stack sealing is used) */ + ENTRY(Reset_Handler) SECTIONS @@ -91,21 +93,11 @@ SECTIONS .text : { KEEP(*(.vectors)) - __Vectors_End = .; - __Vectors_Size = __Vectors_End - __Vectors; - __end__ = .; - *(.text*) KEEP(*(.init)) KEEP(*(.fini)) - KEEP(*(.application_properties)) - KEEP(*(.gecko_configuration)) - KEEP(*(.xo_configuration)) - KEEP(*(.gatt_header)) - KEEP(*(.gatt_data)) - /* .ctors */ *crtbegin.o(.ctors) *crtbegin?.o(.ctors) @@ -122,11 +114,8 @@ SECTIONS *(.rodata*) - KEEP(*(.eh_frame*)) } > FLASH - - .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) @@ -139,44 +128,25 @@ SECTIONS } > FLASH __exidx_end = .; - - - /* To copy multiple ROM to RAM sections, - * uncomment .copy.table section and, - * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */ - /* .copy.table : { . = ALIGN(4); __copy_table_start__ = .; + LONG (__etext) LONG (__data_start__) - LONG (__data_end__ - __data_start__) - LONG (__etext2) - LONG (__data2_start__) - LONG (__data2_end__ - __data2_start__) + LONG ((__data_end__ - __data_start__) / 4) + __copy_table_end__ = .; } > FLASH - */ - /* To clear multiple BSS sections, - * uncomment .zero.table section and, - * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */ - /* .zero.table : { . = ALIGN(4); __zero_table_start__ = .; - LONG (__bss_start__) - LONG (__bss_end__ - __bss_start__) - LONG (__bss2_start__) - LONG (__bss2_end__ - __bss2_start__) __zero_table_end__ = .; + __etext = ALIGN(4); } > FLASH - */ - - __etext = .; - .data : AT (__etext) { @@ -219,11 +189,12 @@ SECTIONS { . = ALIGN(4); __bss_start__ = .; - *(.bss*) + *(.bss) + *(.bss.*) *(COMMON) . = ALIGN(4); __bss_end__ = .; - } > RAM + } > RAM AT > RAM .heap (COPY): { @@ -243,6 +214,7 @@ SECTIONS .stack_dummy (COPY): { KEEP(*(.stack*)) + /* KEEP(*(.stackseal*))*/ } > RAM /* Set stack top to end of RAM, and stack limit move down by @@ -265,4 +237,6 @@ SECTIONS /*ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")*/ ASSERT( (linker_nvm_begin + SIZEOF(.nvm)) <= __main_flash_end__, "NVM3 is excessing the flash size !") + /* Check if FLASH usage exceeds FLASH size */ + ASSERT( LENGTH(FLASH) >= (__etext + SIZEOF(.data)), "FLASH memory overflowed !") } diff --git a/examples/platform/efr32/matter_config.cpp b/examples/platform/efr32/matter_config.cpp index b892620acf3b9f..6f2c70c2259b15 100644 --- a/examples/platform/efr32/matter_config.cpp +++ b/examples/platform/efr32/matter_config.cpp @@ -116,7 +116,7 @@ CHIP_ERROR EFR32MatterConfig::InitMatter(const char * appName) //============================================== EFR32_LOG("Init CHIP Stack"); // Init Chip memory management before the stack - chip::Platform::MemoryInit(); + ReturnErrorOnFailure(chip::Platform::MemoryInit()); ReturnErrorOnFailure(PlatformMgr().InitChipStack()); chip::DeviceLayer::ConnectivityMgr().SetBLEDeviceName(appName); diff --git a/examples/platform/efr32/uart.cpp b/examples/platform/efr32/uart.cpp index 91c8955525bff7..548416d177ce16 100644 --- a/examples/platform/efr32/uart.cpp +++ b/examples/platform/efr32/uart.cpp @@ -44,10 +44,20 @@ extern "C" { #define MIN(A, B) ((A) < (B) ? (A) : (B)) #endif +#ifdef EFR32MG24 +#define HELPER1(x) EUSART##x##_RX_IRQn +#else #define HELPER1(x) USART##x##_RX_IRQn +#endif + #define HELPER2(x) HELPER1(x) +#ifdef EFR32MG24 +#define HELPER3(x) EUSART##x##_RX_IRQHandler +#else #define HELPER3(x) USART##x##_RX_IRQHandler +#endif + #define HELPER4(x) HELPER3(x) // On MG24 boards VCOM runs on the EUSART device, MG12 uses the UART device @@ -55,7 +65,6 @@ extern "C" { #define USART_IRQ HELPER2(SL_UARTDRV_EUSART_VCOM_PERIPHERAL_NO) #define USART_IRQHandler HELPER4(SL_UARTDRV_EUSART_VCOM_PERIPHERAL_NO) #define vcom_handle sl_uartdrv_eusart_vcom_handle - #else #define USART_IRQ HELPER2(SL_UARTDRV_USART_VCOM_PERIPHERAL_NO) #define USART_IRQHandler HELPER4(SL_UARTDRV_USART_VCOM_PERIPHERAL_NO) @@ -208,12 +217,19 @@ void uartConsoleInit(void) UARTDRV_Receive(vcom_handle, sRxDmaBuffer, MAX_DMA_BUFFER_SIZE, UART_rx_callback); UARTDRV_Receive(vcom_handle, sRxDmaBuffer2, MAX_DMA_BUFFER_SIZE, UART_rx_callback); - // Enable USART0 interrupt to wake OT task when data arrives + // Enable USART0/EUSART0 interrupt to wake OT task when data arrives NVIC_ClearPendingIRQ(USART_IRQ); NVIC_EnableIRQ(USART_IRQ); #ifdef EFR32MG24 - EUSART_IntEnable(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, USART_IF_RXDATAV); + // Clear previous RX interrupts + EUSART_IntClear(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, EUSART_IF_RXFL); + + // Enable RX interrupts + EUSART_IntEnable(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, EUSART_IF_RXFL); + + // Enable EUSART + EUSART_Enable(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, eusartEnable); #else USART_IntEnable(SL_UARTDRV_USART_VCOM_PERIPHERAL, USART_IF_RXDATAV); #endif // EFR32MG24 @@ -229,6 +245,10 @@ void USART_IRQHandler(void) #elif !defined(PW_RPC_ENABLED) otSysEventSignalPending(); #endif + +#ifdef EFR32MG24 + EUSART_IntClear(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, EUSART_IF_RXFL); +#endif } /* diff --git a/examples/window-app/efr32/BUILD.gn b/examples/window-app/efr32/BUILD.gn index 33ea182d5316a7..d829fa9d15116b 100644 --- a/examples/window-app/efr32/BUILD.gn +++ b/examples/window-app/efr32/BUILD.gn @@ -82,7 +82,7 @@ if (efr32_board == "BRD4166A" || efr32_board == "BRD4180A") { # WiFi settings if (chip_enable_wifi) { - wifi_sdk_dir = "${chip_root}/third_party/efr32_sdk/repo/matter/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", @@ -95,7 +95,7 @@ if (chip_enable_wifi) { if (use_rs911x) { wiseconnect_sdk_root = - "${chip_root}/third_party/efr32_sdk/wiseconnect-wifi-bt-sdk" + "${chip_root}/third_party/silabs/wiseconnect-wifi-bt-sdk" import("${wifi_sdk_dir}/rs911x/rs911x.gni") } else { import("${wifi_sdk_dir}/wf200/wf200.gni") 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 22ad7b6b227053..8961bb4717b4b0 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 @@ -35,7 +35,8 @@ tests: command: "readAttribute" attribute: "Breadcrumb" response: - value: 0 + constraints: + type: uint64 - label: "TH1 writes the BreadCrumb attribute as 1 to the DUT" command: "writeAttribute" @@ -66,13 +67,28 @@ tests: maxValue: 2 #Issue 17997 - - label: "TH1 reads BasicCommissioningInfo attribute from DUT" - PICS: PICS_SKIP_SAMPLE_APP + - label: + "TH1 reads BasicCommissioningInfo attribute from DUT and Verify that + the BasicCommissioningInfo attribute has the following field: + FailSafeExpiryLengthSeconds field value is within a duration range of + 0 to 65535" command: "readAttribute" attribute: "BasicCommissioningInfo" + + - label: "Step 6 TC-CGEN-2.1" + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: + "Step 6 is implicitly validating the + attribute(BasicCommissioningInfo) constraints, as long as + the payload is being parsed successfully" + + - label: "TH1 reads SupportsConcurrentConnection attribute from the DUT" + command: "readAttribute" + attribute: "SupportsConcurrentConnection" response: - value: - { - FailSafeExpiryLengthSeconds: 60, - MaxCumulativeFailsafeSeconds: 900, - } + constraints: + type: bool diff --git a/src/controller/java/BUILD.gn b/src/controller/java/BUILD.gn index 080abfc0afb2c7..68757d8919c0ff 100644 --- a/src/controller/java/BUILD.gn +++ b/src/controller/java/BUILD.gn @@ -90,8 +90,10 @@ android_library("java") { "src/chip/devicecontroller/ControllerParams.java", "src/chip/devicecontroller/DiscoveredDevice.java", "src/chip/devicecontroller/GetConnectedDeviceCallbackJni.java", + "src/chip/devicecontroller/KeypairDelegate.java", "src/chip/devicecontroller/NetworkCredentials.java", "src/chip/devicecontroller/NetworkLocation.java", + "src/chip/devicecontroller/OperationalKeyConfig.java", "src/chip/devicecontroller/OpenCommissioningCallback.java", "src/chip/devicecontroller/PaseVerifierParams.java", "src/chip/devicecontroller/ReportCallback.java", diff --git a/src/platform/EFR32/BLEManagerImpl.cpp b/src/platform/EFR32/BLEManagerImpl.cpp index 3e675a00dd053c..de1078a668f7ea 100644 --- a/src/platform/EFR32/BLEManagerImpl.cpp +++ b/src/platform/EFR32/BLEManagerImpl.cpp @@ -26,6 +26,8 @@ #include #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include "sl_component_catalog.h" + #include #include "FreeRTOS.h" @@ -88,17 +90,6 @@ namespace { TimerHandle_t sbleAdvTimeoutTimer; // FreeRTOS sw timer. -/* Bluetooth stack configuration parameters (see "UG136: Silicon Labs Bluetooth C Application Developer's Guide" for - * details on each parameter) */ -static sl_bt_configuration_t config; - -/** @brief Table of used BGAPI classes */ -static const struct sli_bgapi_class * const bt_class_table[] = { SL_BT_BGAPI_CLASS(system), SL_BT_BGAPI_CLASS(advertiser), - SL_BT_BGAPI_CLASS(gap), SL_BT_BGAPI_CLASS(scanner), - SL_BT_BGAPI_CLASS(connection), SL_BT_BGAPI_CLASS(gatt), - SL_BT_BGAPI_CLASS(gatt_server), SL_BT_BGAPI_CLASS(nvm), - SL_BT_BGAPI_CLASS(sm), NULL }; - StackType_t bluetoothEventStack[CHIP_DEVICE_CONFIG_BLE_APP_TASK_STACK_SIZE / sizeof(StackType_t)]; StaticTask_t bluetoothEventTaskStruct; static TaskHandle_t BluetoothEventTaskHandle; @@ -131,36 +122,10 @@ extern "C" sl_status_t initialize_bluetooth() NVIC_ClearPendingIRQ(PendSV_IRQn); NVIC_EnableIRQ(PendSV_IRQn); #endif - sl_status_t ret = sl_bt_init_stack(&config); - sl_bt_init_classes(bt_class_table); - sl_bt_init_multiprotocol(); - return ret; -} + sl_status_t err = sl_bt_stack_init(); + EFM_ASSERT(err == SL_STATUS_OK); -static void initBleConfig(void) -{ - memset(&config, 0, sizeof(sl_bt_configuration_t)); - config.config_flags = SL_BT_CONFIG_FLAG_RTOS; /* Check flag options from UG136 */ - config.bluetooth.max_connections = BLE_LAYER_NUM_BLE_ENDPOINTS; /* Maximum number of simultaneous connections */ - config.bluetooth.max_advertisers = BLE_MAX_ADVERTISERS; - config.bluetooth.max_periodic_sync = BLE_CONFIG_MAX_PERIODIC_ADVERTISING_SYNC; - config.bluetooth.max_buffer_memory = BLE_MAX_BUFFER_SIZE; - config.gattdb = &gattdb; /* Pointer to GATT database */ - config.scheduler_callback = BluetoothLLCallback; - config.stack_schedule_callback = BluetoothUpdate; - config.max_timers = BLE_CONFIG_MAX_SOFTWARE_TIMERS; - config.rf.tx_gain = BLE_CONFIG_RF_PATH_GAIN_TX; - config.rf.rx_gain = BLE_CONFIG_RF_PATH_GAIN_RX; - config.rf.tx_min_power = BLE_CONFIG_MIN_TX_POWER; - config.rf.tx_max_power = BLE_CONFIG_MAX_TX_POWER; -#if (HAL_PA_ENABLE) - config.pa.config_enable = 1; /* Set this to be a valid PA config */ -#if defined(FEATURE_PA_INPUT_FROM_VBAT) - config.pa.input = SL_BT_RADIO_PA_INPUT_VBAT; /* Configure PA input to VBAT */ -#else - config.pa.input = SL_BT_RADIO_PA_INPUT_DCDC; /* Configure PA input to DCDC */ -#endif // defined(FEATURE_PA_INPUT_FROM_VBAT) -#endif // (HAL_PA_ENABLE) + return err; } CHIP_ERROR BLEManagerImpl::_Init() @@ -176,13 +141,11 @@ CHIP_ERROR BLEManagerImpl::_Init() memset(mIndConfId, kUnusedIndex, sizeof(mIndConfId)); mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; - initBleConfig(); - // Start Bluetooth Link Layer and stack tasks ret = bluetooth_start(CHIP_DEVICE_CONFIG_BLE_LL_TASK_PRIORITY, CHIP_DEVICE_CONFIG_BLE_STACK_TASK_PRIORITY, initialize_bluetooth); - VerifyOrExit(ret == bg_err_success, err = MapBLEError(ret)); + VerifyOrExit(ret == SL_STATUS_OK, err = MapBLEError(ret)); // Create the Bluetooth Application task BluetoothEventTaskHandle = @@ -523,7 +486,7 @@ bool BLEManagerImpl::SendIndication(BLE_CONNECTION_OBJECT conId, const ChipBleUU VerifyOrExit(timerHandle != kMaxConnections, err = CHIP_ERROR_NO_MEMORY); // start timer for light notification confirmation. Long delay for spake2 indication - sl_bt_system_set_soft_timer(TIMER_S_2_TIMERTICK(6), timerHandle, true); + 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()); err = MapBLEError(ret); @@ -868,13 +831,13 @@ void BLEManagerImpl::HandleConnectionCloseEvent(volatile sl_bt_msg_t * evt) switch (conn_evt->reason) { - case bg_err_bt_remote_user_terminated: - case bg_err_bt_remote_device_terminated_connection_due_to_low_resources: - case bg_err_bt_remote_powering_off: + case SL_STATUS_BT_CTRL_REMOTE_USER_TERMINATED: + case SL_STATUS_BT_CTRL_REMOTE_DEVICE_TERMINATED_CONNECTION_DUE_TO_LOW_RESOURCES: + case SL_STATUS_BT_CTRL_REMOTE_POWERING_OFF: event.CHIPoBLEConnectionError.Reason = BLE_ERROR_REMOTE_DEVICE_DISCONNECTED; break; - case bg_err_bt_connection_terminated_by_local_host: + case SL_STATUS_BT_CTRL_CONNECTION_TERMINATED_BY_LOCAL_HOST: event.CHIPoBLEConnectionError.Reason = BLE_ERROR_APP_CLOSED_CONNECTION; break; @@ -995,7 +958,7 @@ void BLEManagerImpl::HandleTxConfirmationEvent(BLE_CONNECTION_OBJECT conId) if (timerHandle < kMaxConnections) { ChipLogProgress(DeviceLayer, " stop soft timer"); - sl_bt_system_set_soft_timer(0, timerHandle, false); + sl_bt_system_set_lazy_soft_timer(0, 0, timerHandle, false); } event.Type = DeviceEventType::kCHIPoBLEIndicateConfirm; diff --git a/src/platform/EFR32/BlePlatformConfig.h b/src/platform/EFR32/BlePlatformConfig.h index 92a1690269f4a1..eec08879cac19b 100644 --- a/src/platform/EFR32/BlePlatformConfig.h +++ b/src/platform/EFR32/BlePlatformConfig.h @@ -25,7 +25,7 @@ #pragma once -#include "bg_errorcodes.h" +#include "sl_bt_api.h" // ==================== Platform Adaptations ==================== diff --git a/src/platform/EFR32/efr32-chip-mbedtls-config.h b/src/platform/EFR32/efr32-chip-mbedtls-config.h index b3f2a76704d711..edddb2abb6f0c8 100644 --- a/src/platform/EFR32/efr32-chip-mbedtls-config.h +++ b/src/platform/EFR32/efr32-chip-mbedtls-config.h @@ -42,6 +42,7 @@ #define MBEDTLS_ECP_C #define MBEDTLS_ECDH_C #define MBEDTLS_ENTROPY_C +#define MBEDTLS_SHA224_C #define MBEDTLS_SHA256_C #define MBEDTLS_TRNG_C diff --git a/third_party/efr32_sdk/repo b/third_party/efr32_sdk/repo deleted file mode 160000 index c48b8de1bed36c..00000000000000 --- a/third_party/efr32_sdk/repo +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c48b8de1bed36cc57dd8caba94ecda8a7352524c 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 6566feb72700bc..417731e01f5216 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 @@ -64,5 +64,8 @@ cp patch_for_K32W061_SDK_2_6_4/controller_interface.h "$NXP_K32W061_SDK_ROOT"/mi 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!" exit 0 diff --git a/third_party/openthread/platforms/efr32/BUILD.gn b/third_party/openthread/platforms/efr32/BUILD.gn index adc4b41f759722..251932b39108e4 100644 --- a/third_party/openthread/platforms/efr32/BUILD.gn +++ b/third_party/openthread/platforms/efr32/BUILD.gn @@ -30,7 +30,7 @@ config("openthread_efr32_config") { include_dirs = [ "${chip_root}/examples/platform/efr32", - "${efr32_sdk_root}/matter/efr32/${efr32_family}/${efr32_board}", + "${sdk_support_root}/matter/efr32/${efr32_family}/${efr32_board}", "${openthread_efr32_root}/src/src", ] } @@ -50,10 +50,12 @@ source_set("openthread_core_config_efr32") { source_set("libopenthread-efr32") { sources = [ "${openthread_efr32_root}/src/src/alarm.c", + "${openthread_efr32_root}/src/src/crypto.c", "${openthread_efr32_root}/src/src/entropy.c", "${openthread_efr32_root}/src/src/flash.c", "${openthread_efr32_root}/src/src/misc.c", "${openthread_efr32_root}/src/src/radio.c", + "${openthread_efr32_root}/src/src/security_manager.c", "${openthread_efr32_root}/src/src/system.c", "${openthread_root}/examples/apps/cli/cli_uart.cpp", ] diff --git a/third_party/pigweed/repo b/third_party/pigweed/repo index 67bc89cdda8c66..834e876dab7a17 160000 --- a/third_party/pigweed/repo +++ b/third_party/pigweed/repo @@ -1 +1 @@ -Subproject commit 67bc89cdda8c663b1983c6215f14e8db6a19a328 +Subproject commit 834e876dab7a1785a824efbb704d7d139f6ce62d diff --git a/third_party/efr32_sdk/BUILD.gn b/third_party/silabs/BUILD.gn similarity index 100% rename from third_party/efr32_sdk/BUILD.gn rename to third_party/silabs/BUILD.gn diff --git a/third_party/efr32_sdk/efr32_arm.gni b/third_party/silabs/efr32_arm.gni similarity index 100% rename from third_party/efr32_sdk/efr32_arm.gni rename to third_party/silabs/efr32_arm.gni diff --git a/third_party/efr32_sdk/efr32_board.gni b/third_party/silabs/efr32_board.gni similarity index 100% rename from third_party/efr32_sdk/efr32_board.gni rename to third_party/silabs/efr32_board.gni diff --git a/third_party/efr32_sdk/efr32_executable.gni b/third_party/silabs/efr32_executable.gni similarity index 100% rename from third_party/efr32_sdk/efr32_executable.gni rename to third_party/silabs/efr32_executable.gni diff --git a/third_party/efr32_sdk/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni similarity index 94% rename from third_party/efr32_sdk/efr32_sdk.gni rename to third_party/silabs/efr32_sdk.gni index 3fe0e894978505..a5eae3f8e6d45c 100644 --- a/third_party/efr32_sdk/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -22,7 +22,8 @@ import("efr32_board.gni") declare_args() { # Location of the efr32 SDK. - efr32_sdk_root = "${chip_root}/third_party/efr32_sdk/repo" + efr32_sdk_root = "${chip_root}/third_party/silabs/gecko_sdk" + sdk_support_root = "${chip_root}/third_party/silabs/matter_support" enable_openthread_cli = true kvs_max_entries = 75 } @@ -63,11 +64,11 @@ template("efr32_sdk") { "${efr32_sdk_root}/hardware/board/inc", "${efr32_sdk_root}/hardware/driver/memlcd/inc", "${efr32_sdk_root}/hardware/driver/memlcd/src/ls013b7dh03", - "${efr32_sdk_root}/matter/efr32", - "${efr32_sdk_root}/matter/efr32/${efr32_family}/", - "${efr32_sdk_root}/matter/efr32/${efr32_family}/${efr32_board}", "${efr32_sdk_root}/platform/bootloader", - "${efr32_sdk_root}/platform/CMSIS/Include", + "${efr32_sdk_root}/platform/bootloader/config", + "${efr32_sdk_root}/platform/bootloader/config/s2/btl_interface", + "${efr32_sdk_root}/platform/bootloader/api", + "${efr32_sdk_root}/platform/CMSIS/Core/Include", "${efr32_sdk_root}/platform/CMSIS/RTOS2/Include", "${efr32_sdk_root}/platform/common/inc", "${efr32_sdk_root}/platform/driver/button/inc", @@ -110,6 +111,7 @@ template("efr32_sdk") { "${efr32_sdk_root}/protocol/bluetooth/inc/", "${efr32_sdk_root}/util/plugin/plugin-common/fem-control", "${efr32_sdk_root}/util/silicon_labs/silabs_core/graphics", + "${efr32_sdk_root}/util/silicon_labs/silabs_core/memory_manager", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/include", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/include/psa", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library", @@ -118,10 +120,14 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/inc", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/config/", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_psa_driver/inc", + "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_psa_driver/inc/public", "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/inc", "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/src/", "${efr32_sdk_root}/util/third_party/freertos/cmsis/Include", "${efr32_sdk_root}/util/third_party/freertos/kernel/include", + "${sdk_support_root}/matter/efr32", + "${sdk_support_root}/matter/efr32/${efr32_family}/", + "${sdk_support_root}/matter/efr32/${efr32_family}/${efr32_board}", ] defines = [ @@ -147,6 +153,7 @@ template("efr32_sdk") { "MBEDTLS_THREADING_C=1", "MBEDTLS_THREADING_ALT=1", "SL_THREADING_ALT=1", + "SL_COMPONENT_CATALOG_PRESENT", #"__STACK_SIZE=0", ] @@ -254,7 +261,7 @@ template("efr32_sdk") { ] libs += [ - "${efr32_sdk_root}/protocol/bluetooth/lib/EFR32MG24/GCC/binapploader.o", + "${efr32_sdk_root}/protocol/bluetooth/lib/EFR32MG24/GCC/libapploader.a", "${efr32_sdk_root}/protocol/bluetooth/lib/EFR32MG24/GCC/libbluetooth.a", "${efr32_sdk_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_efr32xg24_gcc_release.a", "${efr32_sdk_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", @@ -285,6 +292,10 @@ template("efr32_sdk") { "-Wno-shadow", ] + if (efr32_family == "efr32mg24") { + cflags += [ "-mcmse" ] + } + if (defined(invoker.use_rs911x)) { if (invoker.use_rs911x == true) { #add compilation flags for rs991x build. This will be addressed directly in wiseconnect sdk in the next version release of that sdk @@ -302,13 +313,10 @@ template("efr32_sdk") { "${chip_root}/third_party/mbedtls/repo/include/mbedtls/platform.h", "${efr32_sdk_root}/hardware/board/src/sl_board_control_gpio.c", "${efr32_sdk_root}/hardware/board/src/sl_board_init.c", - "${efr32_sdk_root}/matter/efr32/sl_board_default_init.c", - "${efr32_sdk_root}/matter/efr32/sl_device_init_clocks.c", - "${efr32_sdk_root}/matter/efr32/sl_event_handler.c", - "${efr32_sdk_root}/matter/efr32/sl_simple_button_instances.c", - "${efr32_sdk_root}/matter/efr32/sl_simple_led_instances.c", "${efr32_sdk_root}/platform/CMSIS/RTOS2/Source/os_systick.c", - "${efr32_sdk_root}/platform/bootloader/plugin/security/sha/crypto_sha.c", + "${efr32_sdk_root}/platform/bootloader/api/btl_interface.c", + "${efr32_sdk_root}/platform/bootloader/api/btl_interface_storage.c", + "${efr32_sdk_root}/platform/bootloader/security/sha/crypto_sha.c", "${efr32_sdk_root}/platform/common/src/sl_slist.c", "${efr32_sdk_root}/platform/driver/button/src/sl_button.c", "${efr32_sdk_root}/platform/driver/button/src/sl_simple_button.c", @@ -353,22 +361,22 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay.c", "${efr32_sdk_root}/platform/service/udelay/src/sl_udelay_armv6m_gcc.S", "${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_mbedtls_context.c", + "${efr32_sdk_root}/protocol/bluetooth/src/sl_bt_stack_init.c", + "${efr32_sdk_root}/util/silicon_labs/silabs_core/memory_manager/sl_malloc.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/aes.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/aesni.c", - "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/arc4.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/asn1parse.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/asn1write.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/base64.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/bignum.c", - "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/blowfish.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/camellia.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/ccm.c", - "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/certs.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/chacha20.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/chachapoly.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/cipher.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/cipher_wrap.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/cmac.c", + "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/constant_time.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/ctr_drbg.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/debug.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/des.c", @@ -380,7 +388,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/ecp_curves.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/entropy.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/entropy_poll.c", - "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/error.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/gcm.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/hkdf.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/hmac_drbg.c", @@ -412,7 +419,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/psa_its_file.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/ripemd160.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/rsa.c", - "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/rsa_internal.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/sha1.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/sha256.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/sha512.c", @@ -428,7 +434,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/threading.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/timing.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/version.c", - "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/version_features.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/x509.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/x509_create.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/x509_crl.c", @@ -436,19 +441,21 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/x509_csr.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/x509write_crt.c", "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/x509write_csr.c", - "${efr32_sdk_root}/util/third_party/crypto/mbedtls/library/xtea.c", - "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_alt/source/sl_entropy.c", - "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_alt/source/sl_mbedtls.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/aes_aes.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/crypto_aes.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/crypto_ecp.c", + "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/error.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/mbedtls_ccm.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/mbedtls_cmac.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/mbedtls_ecdsa_ecdh.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/mbedtls_sha.c", + "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/sl_entropy_hardware.c", + "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/sl_mbedtls.c", + "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/version_features.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_crypto.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_radioaes.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_psa_driver/src/crypto_management.c", + "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_psa_driver/src/sl_psa_its_nvm3.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_aead.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_cipher.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_hash.c", @@ -467,6 +474,13 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/freertos/kernel/stream_buffer.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/tasks.c", "${efr32_sdk_root}/util/third_party/freertos/kernel/timers.c", + "${sdk_support_root}/matter/efr32/sl_board_default_init.c", + "${sdk_support_root}/matter/efr32/sl_device_init_clocks.c", + "${sdk_support_root}/matter/efr32/sl_event_handler.c", + "${sdk_support_root}/matter/efr32/sl_simple_button_instances.c", + "${sdk_support_root}/matter/efr32/sl_simple_led_instances.c", + "${sdk_support_root}/matter/efr32/sli_bt_advertiser_config.c", + "${sdk_support_root}/matter/efr32/sli_bt_connection_config.c", ] if (defined(invoker.enable_sleepy_device)) { @@ -487,11 +501,11 @@ template("efr32_sdk") { (defined(invoker.show_qr_code) && invoker.show_qr_code) || (defined(invoker.disable_lcd) && !invoker.disable_lcd)) { sources += [ - "${efr32_sdk_root}/matter/efr32/${efr32_family}/sl_uartdrv_init.c", "${efr32_sdk_root}/platform/emdrv/uartdrv/src/uartdrv.c", "${efr32_sdk_root}/platform/emlib/src/em_eusart.c", "${efr32_sdk_root}/platform/emlib/src/em_leuart.c", "${efr32_sdk_root}/platform/emlib/src/em_usart.c", + "${sdk_support_root}/matter/efr32/${efr32_family}/sl_uartdrv_init.c", ] if (efr32_family == "efr32mg12") { @@ -542,7 +556,7 @@ template("efr32_sdk") { if (efr32_family == "efr32mg12") { sources += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Source/GCC/startup_efr32mg12p.c", + "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Source/startup_efr32mg12p.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG12P/Source/system_efr32mg12p.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s1.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s1.c", @@ -552,7 +566,7 @@ template("efr32_sdk") { ] } else if (efr32_family == "efr32mg21") { sources += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/GCC/startup_efr32mg21.c", + "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/startup_efr32mg21.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG21/Source/system_efr32mg21.c", "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rf_path/sl_rail_util_rf_path.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", @@ -568,7 +582,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_key_handling.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_signature.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_alt/source/sl_psa_its_nvm3.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_alt/source/sl_se_management.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/se_aes.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/se_gcm.c", @@ -592,8 +605,9 @@ template("efr32_sdk") { ] } else if (efr32_family == "efr32mg24") { sources += [ - "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/GCC/startup_efr32mg24.c", + "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/startup_efr32mg24.c", "${efr32_sdk_root}/platform/Device/SiliconLabs/EFR32MG24/Source/system_efr32mg24.c", + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_curves_efr32.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s2.c", "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s2.c", @@ -608,8 +622,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_key_handling.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_signature.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/se_manager/src/sl_se_manager_util.c", - "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_alt/source/sl_psa_its_nvm3.c", - "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_alt/source/sl_se_management.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/se_aes.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_mbedtls_support/src/se_jpake.c", "${efr32_sdk_root}/util/third_party/crypto/sl_component/sl_protocol_crypto/src/sli_radioaes_management.c", diff --git a/third_party/silabs/gecko_sdk b/third_party/silabs/gecko_sdk new file mode 160000 index 00000000000000..310814a9016b60 --- /dev/null +++ b/third_party/silabs/gecko_sdk @@ -0,0 +1 @@ +Subproject commit 310814a9016b60a8012d50c62cc168a783ac102b diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support new file mode 160000 index 00000000000000..0da3151735033b --- /dev/null +++ b/third_party/silabs/matter_support @@ -0,0 +1 @@ +Subproject commit 0da3151735033b26a77eaa6c291ae5da69525cc3 diff --git a/third_party/efr32_sdk/wiseconnect-wifi-bt-sdk b/third_party/silabs/wiseconnect-wifi-bt-sdk similarity index 100% rename from third_party/efr32_sdk/wiseconnect-wifi-bt-sdk rename to third_party/silabs/wiseconnect-wifi-bt-sdk diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 989009966e478a..bc159c2318982c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -135,7 +135,6 @@ class TestList : public Command printf("Test_TC_OO_1_1\n"); printf("Test_TC_OO_2_1\n"); printf("Test_TC_OO_2_2\n"); - printf("Test_TC_OO_2_3\n"); printf("Test_TC_OO_2_4\n"); printf("Test_TC_PS_1_1\n"); printf("Test_TC_PS_2_1\n"); @@ -166,6 +165,8 @@ class TestList : public Command printf("Test_TC_ULABEL_1_1\n"); printf("Test_TC_ULABEL_2_2\n"); printf("Test_TC_ULABEL_2_3\n"); + printf("Test_TC_ULABEL_2_4\n"); + printf("Test_TC_ULABEL_2_5\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -218,9 +219,9 @@ class TestList : public Command printf("TestArmFailSafe\n"); printf("TestFanControl\n"); printf("TestMultiAdmin\n"); - printf("Test_TC_SWDIAG_1_1\n"); - printf("Test_TC_SWDIAG_2_1\n"); - printf("Test_TC_SWDIAG_3_1\n"); + printf("Test_TC_DGSW_2_1\n"); + printf("Test_TC_DGSW_2_2\n"); + printf("Test_TC_DGSW_2_3\n"); printf("TestSubscribe_OnOff\n"); printf("DL_UsersAndCredentials\n"); printf("DL_LockUnlock\n"); @@ -467,7 +468,9 @@ class ManualTestList : public Command printf("Test_TC_SC_4_8\n"); printf("Test_TC_SC_4_9\n"); printf("Test_TC_SC_4_10\n"); - printf("Test_TC_SWDIAG_1_2\n"); + printf("Test_TC_DGSW_1_1\n"); + printf("Test_TC_DGSW_3_1\n"); + printf("Test_TC_DGSW_3_2\n"); printf("Test_TC_DGWIFI_1_1\n"); printf("Test_TC_DGWIFI_2_2\n"); printf("Test_TC_DGWIFI_3_1\n"); @@ -500,14 +503,12 @@ class ManualTestList : public Command printf("Test_TC_DL_2_6\n"); printf("Test_TC_DL_2_8\n"); printf("Test_TC_DL_2_10\n"); - printf("Test_TC_LC_2_3\n"); - printf("Test_TC_LC_2_4\n"); - printf("Test_TC_LC_2_5\n"); printf("Test_TC_LCFG_1_1\n"); printf("Test_TC_LCFG_2_1\n"); printf("Test_TC_LCFG_3_1\n"); printf("Test_TC_LVL_2_3\n"); printf("Test_TC_LVL_8_1\n"); + printf("Test_TC_OO_2_3\n"); printf("Test_TC_OO_3_1\n"); printf("Test_TC_OO_3_2\n"); printf("Test_TC_RH_2_2\n"); @@ -604,8 +605,8 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNonNull("acl[0].targets", iter_0.GetValue().targets)); { @@ -636,10 +637,10 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn( CheckNoMoreListItems("acl[0].targets.Value()", iter_3, 3)); } - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); { auto iter_3 = iter_0.GetValue().subjects.Value().begin(); @@ -687,10 +688,10 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn( CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 3)); } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); { auto iter_3 = iter_0.GetValue().subjects.Value().begin(); @@ -738,7 +739,7 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn( CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 3)); } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); } } @@ -755,17 +756,17 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[1].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); } } @@ -782,11 +783,11 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } } @@ -803,11 +804,11 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } } @@ -824,11 +825,11 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } } @@ -845,11 +846,11 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } } @@ -866,11 +867,11 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } } @@ -887,11 +888,11 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } } @@ -908,8 +909,8 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNonNull("acl[0].targets", iter_0.GetValue().targets)); { @@ -940,10 +941,10 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn( CheckNoMoreListItems("acl[0].targets.Value()", iter_3, 3)); } - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); - VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1)); - VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 1U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); { auto iter_3 = iter_0.GetValue().subjects.Value().begin(); @@ -991,10 +992,10 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn( CheckNoMoreListItems("acl[1].targets.Value()", iter_3, 3)); } - VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 2)); - VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3)); - VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3)); + VerifyOrReturn(CheckValue("acl[2].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[2].authMode", iter_0.GetValue().authMode, 3U)); VerifyOrReturn(CheckValueNonNull("acl[2].subjects", iter_0.GetValue().subjects)); { auto iter_3 = iter_0.GetValue().subjects.Value().begin(); @@ -1042,7 +1043,7 @@ class TestAccessControlClusterSuite : public TestCommand VerifyOrReturn( CheckNoMoreListItems("acl[2].targets.Value()", iter_3, 3)); } - VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 3)); } } @@ -1059,11 +1060,11 @@ class TestAccessControlClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); - VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5)); - VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); VerifyOrReturn(CheckValueNull("acl[0].subjects", iter_0.GetValue().subjects)); VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); - VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 1)); } } @@ -1152,7 +1153,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 3); } - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(2); @@ -1193,7 +1194,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 3); } - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; listHolder_0->mList[2].privilege = static_cast(3); listHolder_0->mList[2].authMode = static_cast(3); @@ -1234,7 +1235,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 3); } - listHolder_0->mList[2].fabricIndex = 0; + listHolder_0->mList[2].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 3); @@ -1260,7 +1261,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(2); @@ -1271,7 +1272,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[1].targets.Value() = chip::app::DataModel::List(); - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -1297,13 +1298,13 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(5); listHolder_0->mList[1].authMode = static_cast(3); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -1329,13 +1330,13 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(1); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -1361,7 +1362,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(2); @@ -1374,7 +1375,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -1400,7 +1401,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(2); @@ -1419,7 +1420,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 1); } - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -1445,7 +1446,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(2); @@ -1477,7 +1478,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 20); } listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -1503,7 +1504,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(2); @@ -1618,7 +1619,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 20); } - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -1669,7 +1670,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 3); } - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(1); listHolder_0->mList[1].authMode = static_cast(2); @@ -1710,7 +1711,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 3); } - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; listHolder_0->mList[2].privilege = static_cast(3); listHolder_0->mList[2].authMode = static_cast(3); @@ -1751,7 +1752,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 3); } - listHolder_0->mList[2].fabricIndex = 0; + listHolder_0->mList[2].fabricIndex = 0U; listHolder_0->mList[3].privilege = static_cast(1); listHolder_0->mList[3].authMode = static_cast(2); @@ -1792,7 +1793,7 @@ class TestAccessControlClusterSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 3); } - listHolder_0->mList[3].fabricIndex = 0; + listHolder_0->mList[3].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 4); @@ -1818,7 +1819,7 @@ class TestAccessControlClusterSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 1); @@ -2098,7 +2099,7 @@ class Test_TC_BI_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0)); + VerifyOrReturn(CheckValue("statusFlags", value, 0U)); } break; case 9: @@ -2107,8 +2108,8 @@ class Test_TC_BI_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); } break; case 10: @@ -2119,7 +2120,7 @@ class Test_TC_BI_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0)); + VerifyOrReturn(CheckValue("statusFlags", value, 0U)); } break; default: @@ -2199,7 +2200,7 @@ class Test_TC_BI_2_1Suite : public TestCommand LogStep(10, "Write the default values to mandatory non-global attribute: StatusFlags"); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), BinaryInputBasic::Id, BinaryInputBasic::Attributes::StatusFlags::Id, value, chip::NullOptional, chip::NullOptional); } @@ -2274,7 +2275,7 @@ class Test_TC_BI_2_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0)); + VerifyOrReturn(CheckValue("statusFlags", value, 0U)); } break; case 4: @@ -2298,7 +2299,7 @@ class Test_TC_BI_2_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0)); + VerifyOrReturn(CheckValue("statusFlags", value, 0U)); } break; case 7: @@ -2306,7 +2307,7 @@ class Test_TC_BI_2_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0)); + VerifyOrReturn(CheckValue("statusFlags", value, 0U)); } break; case 8: @@ -2314,7 +2315,7 @@ class Test_TC_BI_2_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusFlags", value, 0)); + VerifyOrReturn(CheckValue("statusFlags", value, 0U)); } break; default: @@ -2993,7 +2994,7 @@ class Test_TC_CC_1_1Suite : public TestCommand class Test_TC_CC_2_1Suite : public TestCommand { public: - Test_TC_CC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_1", 60, credsIssuerConfig) + Test_TC_CC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_1", 61, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -3014,6 +3015,8 @@ class Test_TC_CC_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; } // @@ -3035,7 +3038,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, 0)); + VerifyOrReturn(CheckValue("currentHue", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; @@ -3044,7 +3047,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, 0)); + VerifyOrReturn(CheckValue("currentSaturation", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; @@ -3107,7 +3110,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 1)); + VerifyOrReturn(CheckValue("colorMode", value, 1U)); } break; case 10: @@ -3116,8 +3119,8 @@ class Test_TC_CC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; case 11: @@ -3125,7 +3128,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("options", value, 0)); + VerifyOrReturn(CheckValue("options", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "map8")); } break; @@ -3143,7 +3146,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 1)); + VerifyOrReturn(CheckValue("enhancedColorMode", value, 1U)); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); } break; @@ -3152,7 +3155,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; @@ -3161,7 +3164,7 @@ class Test_TC_CC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0)); + VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; @@ -3195,12 +3198,21 @@ class Test_TC_CC_2_1Suite : public TestCommand case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorCapabilities", value, 0U)); + + FeatureMapValue = value; } break; case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); + } + break; + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3210,7 +3222,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3218,7 +3230,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorTempPhysicalMinMireds", value, 0U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3228,7 +3240,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3236,7 +3248,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorTempPhysicalMaxMireds", value, 65279U)); } break; - case 24: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3246,7 +3258,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 25: + case 26: if (IsUnsupported(status.mStatus)) { return; @@ -3260,7 +3272,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 26: + case 27: if (IsUnsupported(status.mStatus)) { return; @@ -3274,7 +3286,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 27: + case 28: if (IsUnsupported(status.mStatus)) { return; @@ -3287,7 +3299,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; - case 28: + case 29: if (IsUnsupported(status.mStatus)) { return; @@ -3297,11 +3309,11 @@ class Test_TC_CC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } break; - case 29: + case 30: if (IsUnsupported(status.mStatus)) { return; @@ -3314,17 +3326,17 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value.size(), 254)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3334,7 +3346,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3344,7 +3356,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -3352,7 +3364,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3362,7 +3374,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3372,7 +3384,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 36: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -3380,7 +3392,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 37: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3390,7 +3402,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 38: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3400,7 +3412,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 39: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -3408,7 +3420,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 40: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3418,7 +3430,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 41: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3428,7 +3440,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -3436,7 +3448,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3446,7 +3458,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3456,7 +3468,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -3464,7 +3476,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 46: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3474,7 +3486,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 47: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -3484,7 +3496,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 48: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -3492,7 +3504,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 49: + case 50: if (IsUnsupported(status.mStatus)) { return; @@ -3506,7 +3518,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 50: + case 51: if (IsUnsupported(status.mStatus)) { return; @@ -3520,7 +3532,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 51: + case 52: if (IsUnsupported(status.mStatus)) { return; @@ -3534,7 +3546,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 52: + case 53: if (IsUnsupported(status.mStatus)) { return; @@ -3548,7 +3560,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 53: + case 54: if (IsUnsupported(status.mStatus)) { return; @@ -3560,7 +3572,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 54: + case 55: if (IsUnsupported(status.mStatus)) { return; @@ -3574,7 +3586,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 55: + case 56: if (IsUnsupported(status.mStatus)) { return; @@ -3588,7 +3600,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 56: + case 57: if (IsUnsupported(status.mStatus)) { return; @@ -3600,7 +3612,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 57: + case 58: if (IsUnsupported(status.mStatus)) { return; @@ -3614,7 +3626,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 58: + case 59: if (IsUnsupported(status.mStatus)) { return; @@ -3628,7 +3640,7 @@ class Test_TC_CC_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 59: + case 60: if (IsUnsupported(status.mStatus)) { return; @@ -3664,31 +3676,37 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 1: { LogStep(1, "Validate constraints of attribute: CurrentHue"); + 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, "Validate constraints of attribute: CurrentSaturation"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Validate constraints of attribute: CurrentX"); + 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, "Reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } case 6: { LogStep(6, "Validate constraints of attribute: CurrentY"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } @@ -3700,6 +3718,7 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 8: { LogStep(8, "Validate constraints of attribute: ColorTemperatureMireds"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -3711,16 +3730,19 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 10: { LogStep(10, "Validate constraints of attribute: ColorMode"); + VerifyOrDo(!ShouldSkip("CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, chip::NullOptional); } case 11: { LogStep(11, "Validate constraints of attribute: Options"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, chip::NullOptional); } case 12: { LogStep(12, "Validate constraints of attribute: EnhancedCurrentHue"); + VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -3732,231 +3754,282 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 14: { LogStep(14, "Validate constraints of attribute: ColorLoopActive"); + 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 15: { LogStep(15, "Validate constraints of attribute: ColorLoopDirection"); + 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 16: { LogStep(16, "Validate constraints of attribute: ColorLoopTime"); + 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 17: { LogStep(17, "Validate constraints of attribute: ColorLoopStartEnhancedHue"); + 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 18: { LogStep(18, "Validate constraints of attribute: ColorLoopStoredEnhancedHue"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Reads ColorCapabilities attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id, - true, chip::NullOptional); + LogStep(19, "read the optional global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 20: { - LogStep(20, "Validate constraints of attribute: ColorCapabilities"); + LogStep(20, "Reads ColorCapabilities attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "Reads ColorTempPhysicalMinMireds attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); + LogStep(21, "Validate constraints of attribute: ColorCapabilities"); + VerifyOrDo(!ShouldSkip("CC.S.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id, + true, chip::NullOptional); } case 22: { - LogStep(22, "Validate constraints of attribute: ColorTempPhysicalMinMireds"); + LogStep(22, "Reads ColorTempPhysicalMinMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "Read ColorTempPhysicalMaxMireds attribute from DUT"); + LogStep(23, "Validate constraints of attribute: ColorTempPhysicalMinMireds"); + VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); + ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Validate constraints of attribute: ColorTempPhysicalMaxMireds"); + LogStep(24, "Read ColorTempPhysicalMaxMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Read the optional attribute: CoupleColorTempToLevelMinMireds"); + LogStep(25, "Validate constraints of attribute: ColorTempPhysicalMaxMireds"); + VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id, true, chip::NullOptional); + ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } case 26: { - LogStep(26, "Read the optional attribute: StartUpColorTemperatureMireds"); + LogStep(26, "Read the optional attribute: CoupleColorTempToLevelMinMireds"); + VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); + ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Validate constraints of attribute: RemainingTime"); + LogStep(27, "Read the optional attribute: StartUpColorTemperatureMireds"); + VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Validate constraints of attribute: RemainingTime"); + VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read the optional attribute: DriftCompensation"); + case 29: { + LogStep(29, "Read the optional attribute: DriftCompensation"); + VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read the optional attribute: CompensationText"); + case 30: { + LogStep(30, "Read the optional attribute: CompensationText"); + VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Read the mandatory attribute: NumberOfPrimaries"); + case 31: { + LogStep(31, "Read the mandatory attribute: NumberOfPrimaries"); + VerifyOrDo(!ShouldSkip("CC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Read the mandatory attribute: Primary1X"); + case 32: { + LogStep(32, "Read the mandatory attribute: Primary1X"); + VerifyOrDo(!ShouldSkip("CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1X::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Read the mandatory attribute: Primary1Y"); + case 33: { + LogStep(33, "Read the mandatory attribute: Primary1Y"); + VerifyOrDo(!ShouldSkip("CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Y::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Read the mandatory attribute: Primary1Intensity"); + case 34: { + LogStep(34, "Read the mandatory attribute: Primary1Intensity"); + VerifyOrDo(!ShouldSkip("CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary1Intensity::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Read the mandatory attribute: Primary2X"); + case 35: { + LogStep(35, "Read the mandatory attribute: Primary2X"); + VerifyOrDo(!ShouldSkip("CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2X::Id, true, chip::NullOptional); } - case 35: { - LogStep(35, "Read the mandatory attribute: Primary2Y"); + case 36: { + LogStep(36, "Read the mandatory attribute: Primary2Y"); + VerifyOrDo(!ShouldSkip("CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Y::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Validate constraints of attribute: Primary2Intensity"); + case 37: { + LogStep(37, "Validate constraints of attribute: Primary2Intensity"); + VerifyOrDo(!ShouldSkip("CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary2Intensity::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Read the mandatory attribute: Primary3X"); + case 38: { + LogStep(38, "Read the mandatory attribute: Primary3X"); + VerifyOrDo(!ShouldSkip("CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3X::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Read the mandatory attribute: Primary3Y"); + case 39: { + LogStep(39, "Read the mandatory attribute: Primary3Y"); + VerifyOrDo(!ShouldSkip("CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Y::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Read the mandatory attribute: Primary3Intensity"); + case 40: { + LogStep(40, "Read the mandatory attribute: Primary3Intensity"); + VerifyOrDo(!ShouldSkip("CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary3Intensity::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "Read the mandatory attribute: Primary4X"); + case 41: { + LogStep(41, "Read the mandatory attribute: Primary4X"); + VerifyOrDo(!ShouldSkip("CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4X::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Read the mandatory attribute: Primary4Y"); + case 42: { + LogStep(42, "Read the mandatory attribute: Primary4Y"); + VerifyOrDo(!ShouldSkip("CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Y::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "Read the mandatory attribute: Primary4Intensity"); + case 43: { + LogStep(43, "Read the mandatory attribute: Primary4Intensity"); + VerifyOrDo(!ShouldSkip("CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary4Intensity::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "Read the mandatory attribute: Primary5X"); + case 44: { + LogStep(44, "Read the mandatory attribute: Primary5X"); + VerifyOrDo(!ShouldSkip("CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5X::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Read the mandatory attribute: Primary5Y"); + case 45: { + LogStep(45, "Read the mandatory attribute: Primary5Y"); + VerifyOrDo(!ShouldSkip("CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Y::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Read the mandatory attribute: Primary5Intensity"); + case 46: { + LogStep(46, "Read the mandatory attribute: Primary5Intensity"); + VerifyOrDo(!ShouldSkip("CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary5Intensity::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Read the mandatory attribute: Primary6X"); + case 47: { + LogStep(47, "Read the mandatory attribute: Primary6X"); + VerifyOrDo(!ShouldSkip("CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6X::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "Read the mandatory attribute: Primary6Y"); + case 48: { + LogStep(48, "Read the mandatory attribute: Primary6Y"); + VerifyOrDo(!ShouldSkip("CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Y::Id, true, chip::NullOptional); } - case 48: { - LogStep(48, "Read the mandatory attribute: Primary6Intensity"); + case 49: { + LogStep(49, "Read the mandatory attribute: Primary6Intensity"); + VerifyOrDo(!ShouldSkip("CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Primary6Intensity::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Read the optional attribute: WhitePointX"); + case 50: { + LogStep(50, "Read the optional attribute: WhitePointX"); + VerifyOrDo(!ShouldSkip("CC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id, true, chip::NullOptional); } - case 50: { - LogStep(50, "Read the optional attribute: WhitePointY"); + case 51: { + LogStep(51, "Read the optional attribute: WhitePointY"); + VerifyOrDo(!ShouldSkip("CC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Read the optional attribute: ColorPointRX"); + case 52: { + LogStep(52, "Read the optional attribute: ColorPointRX"); + VerifyOrDo(!ShouldSkip("CC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id, true, chip::NullOptional); } - case 52: { - LogStep(52, "Read the optional attribute: ColorPointRY"); + case 53: { + LogStep(53, "Read the optional attribute: ColorPointRY"); + VerifyOrDo(!ShouldSkip("CC.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id, true, chip::NullOptional); } - case 53: { - LogStep(53, "Read the optional attribute: ColorPointRIntensity"); + case 54: { + LogStep(54, "Read the optional attribute: ColorPointRIntensity"); + VerifyOrDo(!ShouldSkip("CC.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRIntensity::Id, true, chip::NullOptional); } - case 54: { - LogStep(54, "Read the optional attribute: ColorPointGX"); + case 55: { + LogStep(55, "Read the optional attribute: ColorPointGX"); + VerifyOrDo(!ShouldSkip("CC.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "Read the optional attribute: ColorPointGY"); + case 56: { + LogStep(56, "Read the optional attribute: ColorPointGY"); + VerifyOrDo(!ShouldSkip("CC.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id, true, chip::NullOptional); } - case 56: { - LogStep(56, "Read the optional attribute: ColorPointGIntensity"); + case 57: { + LogStep(57, "Read the optional attribute: ColorPointGIntensity"); + VerifyOrDo(!ShouldSkip("CC.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGIntensity::Id, true, chip::NullOptional); } - case 57: { - LogStep(57, "Read the optional attribute: ColorPointBX"); + case 58: { + LogStep(58, "Read the optional attribute: ColorPointBX"); + VerifyOrDo(!ShouldSkip("CC.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id, true, chip::NullOptional); } - case 58: { - LogStep(58, "Read the optional attribute: ColorPointBY"); + case 59: { + LogStep(59, "Read the optional attribute: ColorPointBY"); + VerifyOrDo(!ShouldSkip("CC.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id, true, chip::NullOptional); } - case 59: { - LogStep(59, "Read the optional attribute: ColorPointBIntensity"); + case 60: { + LogStep(60, "Read the optional attribute: ColorPointBIntensity"); + VerifyOrDo(!ShouldSkip("CC.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBIntensity::Id, true, chip::NullOptional); } @@ -4022,8 +4095,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 4: @@ -4039,8 +4112,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -4053,8 +4126,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 9: @@ -4067,8 +4140,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 11: @@ -4084,8 +4157,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 14: @@ -4098,8 +4171,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 16: @@ -4112,8 +4185,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 18: @@ -4129,8 +4202,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 21: @@ -4143,8 +4216,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 23: @@ -4157,8 +4230,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 25: @@ -4174,8 +4247,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 28: @@ -4188,8 +4261,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 30: @@ -4202,8 +4275,8 @@ class Test_TC_CC_3_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 32: @@ -4253,18 +4326,20 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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, "Move to hue shortest distance command"); + VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 150; + value.hue = 150U; value.direction = static_cast(0); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, chip::NullOptional @@ -4279,6 +4354,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4291,6 +4367,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4303,18 +4380,20 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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 to hue longest distance command"); + VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200; + value.hue = 200U; value.direction = static_cast(1); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, chip::NullOptional @@ -4329,6 +4408,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4341,6 +4421,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4353,18 +4434,20 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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 to hue up command"); + VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 250; + value.hue = 250U; value.direction = static_cast(2); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, chip::NullOptional @@ -4379,6 +4462,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4391,6 +4475,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4403,18 +4488,20 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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 to hue down command"); + VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 225; + value.hue = 225U; value.direction = static_cast(3); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, chip::NullOptional @@ -4429,6 +4516,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4441,6 +4529,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4453,6 +4542,7 @@ class Test_TC_CC_3_1Suite : public TestCommand } 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); } @@ -4530,8 +4620,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 4: @@ -4547,8 +4637,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -4561,8 +4651,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 9: @@ -4575,8 +4665,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 11: @@ -4592,8 +4682,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 14: @@ -4606,8 +4696,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 16: @@ -4620,8 +4710,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 18: @@ -4637,8 +4727,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 21: @@ -4651,8 +4741,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 23: @@ -4665,8 +4755,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 25: @@ -4682,8 +4772,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 28: @@ -4696,8 +4786,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 30: @@ -4710,8 +4800,8 @@ class Test_TC_CC_3_2Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 32: @@ -4761,17 +4851,19 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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, "Move hue up 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(1); - value.rate = 50; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 50U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional @@ -4786,6 +4878,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4798,6 +4891,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4810,17 +4904,19 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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 = 50; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 50U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional @@ -4835,6 +4931,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4847,6 +4944,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4859,17 +4957,19 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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 = 50; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 50U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional @@ -4884,6 +4984,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4896,6 +4997,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4908,17 +5010,19 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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 = 50; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 50U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional @@ -4933,6 +5037,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4945,6 +5050,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -4957,6 +5063,7 @@ class Test_TC_CC_3_2Suite : public TestCommand } 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); } @@ -5034,8 +5141,8 @@ class Test_TC_CC_3_3Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 4: @@ -5051,8 +5158,8 @@ class Test_TC_CC_3_3Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -5068,8 +5175,8 @@ class Test_TC_CC_3_3Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 10: @@ -5119,18 +5226,20 @@ class Test_TC_CC_3_3Suite : public TestCommand } 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 = 5; - value.transitionTime = 25; - value.optionsMask = 0; - value.optionsOverride = 0; + value.stepSize = 5U; + value.transitionTime = 25U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, chip::NullOptional @@ -5145,18 +5254,20 @@ class Test_TC_CC_3_3Suite : public TestCommand } case 6: { LogStep(6, "Over TransitionTime,Read 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 7: { LogStep(7, "Step hue down 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(3); - value.stepSize = 5; - value.transitionTime = 25; - value.optionsMask = 0; - value.optionsOverride = 0; + value.stepSize = 5U; + value.transitionTime = 25U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, chip::NullOptional @@ -5171,6 +5282,7 @@ class Test_TC_CC_3_3Suite : public TestCommand } case 9: { LogStep(9, "Over TransitionTime,Read 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); } @@ -5248,8 +5360,8 @@ class Test_TC_CC_4_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 4: @@ -5265,8 +5377,8 @@ class Test_TC_CC_4_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -5279,8 +5391,8 @@ class Test_TC_CC_4_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 9: @@ -5293,8 +5405,8 @@ class Test_TC_CC_4_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 11: @@ -5344,17 +5456,19 @@ class Test_TC_CC_4_1Suite : public TestCommand } case 3: { LogStep(3, "Check Saturation attribute value matched before any change"); + 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 4: { LogStep(4, "Move to saturation command"); + VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = 90; + value.saturation = 90U; value.transitionTime = 10U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, value, chip::NullOptional @@ -5369,6 +5483,7 @@ class Test_TC_CC_4_1Suite : public TestCommand } 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); } @@ -5381,6 +5496,7 @@ class Test_TC_CC_4_1Suite : public TestCommand } 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); } @@ -5393,6 +5509,7 @@ class Test_TC_CC_4_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -5470,8 +5587,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 4: @@ -5487,8 +5604,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -5501,8 +5618,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 9: @@ -5515,8 +5632,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 11: @@ -5532,8 +5649,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 14: @@ -5546,8 +5663,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 16: @@ -5560,8 +5677,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 18: @@ -5577,8 +5694,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 21: @@ -5591,8 +5708,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 23: @@ -5605,8 +5722,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 25: @@ -5622,8 +5739,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 28: @@ -5636,8 +5753,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 30: @@ -5650,8 +5767,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 32: @@ -5667,8 +5784,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 35: @@ -5681,8 +5798,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 37: @@ -5695,8 +5812,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 39: @@ -5712,8 +5829,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 42: @@ -5726,8 +5843,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 44: @@ -5740,8 +5857,8 @@ 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, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 46: @@ -5791,17 +5908,19 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 5; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional @@ -5816,6 +5935,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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); } @@ -5828,6 +5948,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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); } @@ -5840,17 +5961,19 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(3); - value.rate = 5; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional @@ -5865,6 +5988,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -5877,6 +6001,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -5889,17 +6014,19 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 5; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional @@ -5914,6 +6041,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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); } @@ -5926,6 +6054,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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); } @@ -5938,17 +6067,19 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(0); - value.rate = 5; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional @@ -5963,6 +6094,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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); } @@ -5975,6 +6107,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -5987,17 +6120,19 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(3); - value.rate = 5; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional @@ -6012,6 +6147,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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); } @@ -6024,6 +6160,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -6036,17 +6173,19 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(0); - value.rate = 5; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional @@ -6061,6 +6200,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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); } @@ -6073,6 +6213,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -6085,6 +6226,7 @@ class Test_TC_CC_4_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -6162,8 +6304,8 @@ class Test_TC_CC_4_3Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 4: @@ -6179,8 +6321,8 @@ class Test_TC_CC_4_3Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -6196,8 +6338,8 @@ class Test_TC_CC_4_3Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 10: @@ -6247,18 +6389,20 @@ class Test_TC_CC_4_3Suite : public TestCommand } case 3: { LogStep(3, "Reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 4: { LogStep(4, "Step saturation up command"); + VerifyOrDo(!ShouldSkip("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 = 15; - value.transitionTime = 10; - value.optionsMask = 0; - value.optionsOverride = 0; + value.stepSize = 15U; + value.transitionTime = 10U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, chip::NullOptional @@ -6273,18 +6417,20 @@ class Test_TC_CC_4_3Suite : public TestCommand } case 6: { LogStep(6, "Over TransitionTime,Read CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 7: { LogStep(7, "Step saturation down command"); + VerifyOrDo(!ShouldSkip("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 = 20; - value.transitionTime = 10; - value.optionsMask = 0; - value.optionsOverride = 0; + value.stepSize = 20U; + value.transitionTime = 10U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, chip::NullOptional @@ -6299,6 +6445,7 @@ class Test_TC_CC_4_3Suite : public TestCommand } case 9: { LogStep(9, "Over TransitionTime,Reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -6376,8 +6523,8 @@ class Test_TC_CC_4_4Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 4: @@ -6386,8 +6533,8 @@ class Test_TC_CC_4_4Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 5: @@ -6403,8 +6550,8 @@ class Test_TC_CC_4_4Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 8: @@ -6413,8 +6560,8 @@ class Test_TC_CC_4_4Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 9: @@ -6464,23 +6611,26 @@ class Test_TC_CC_4_4Suite : public TestCommand } case 3: { LogStep(3, "Check current hue attribute value matched before any change"); + 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, "Check Saturation attribute value matched before any change"); + 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 5: { LogStep(5, "Move To current hue and saturation command"); + VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type value; - value.hue = 40; - value.saturation = 160; + value.hue = 40U; + value.saturation = 160U; value.transitionTime = 10U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id, value, chip::NullOptional @@ -6495,11 +6645,13 @@ class Test_TC_CC_4_4Suite : public TestCommand } 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)); 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -6665,23 +6817,26 @@ class Test_TC_CC_5_1Suite : public TestCommand } case 3: { LogStep(3, "Check current x attribute value matched before any change"); + 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 4: { LogStep(4, "Check current y attribute value matched before any change"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Move to Color command"); + VerifyOrDo(!ShouldSkip("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.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, chip::NullOptional @@ -6696,11 +6851,13 @@ class Test_TC_CC_5_1Suite : public TestCommand } 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)); 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } @@ -6889,22 +7046,25 @@ class Test_TC_CC_5_2Suite : public TestCommand } case 3: { LogStep(3, "Check current x attribute value matched before any change"); + 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 4: { LogStep(4, "Check current y attribute value matched before any change"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Move Color command"); + VerifyOrDo(!ShouldSkip("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.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, chip::NullOptional @@ -6919,20 +7079,23 @@ class Test_TC_CC_5_2Suite : public TestCommand } 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)); 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, chip::NullOptional @@ -6940,11 +7103,13 @@ 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)); 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } @@ -7110,23 +7275,26 @@ class Test_TC_CC_5_3Suite : public TestCommand } case 3: { LogStep(3, "Check current x attribute value matched before any change"); + 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 4: { LogStep(4, "Check current y attribute value matched before any change"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } case 5: { LogStep(5, "Step Color command"); + VerifyOrDo(!ShouldSkip("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.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id, value, chip::NullOptional @@ -7141,11 +7309,13 @@ class Test_TC_CC_5_3Suite : public TestCommand } 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)); 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } @@ -7291,17 +7461,19 @@ class Test_TC_CC_6_1Suite : public TestCommand } case 3: { LogStep(3, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; value.colorTemperature = 100U; value.transitionTime = 10U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, value, chip::NullOptional @@ -7316,6 +7488,7 @@ class Test_TC_CC_6_1Suite : public TestCommand } case 6: { LogStep(6, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7630,19 +7803,21 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 3: { LogStep(3, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("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)); 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 = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional @@ -7657,6 +7832,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 6: { LogStep(6, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7669,6 +7845,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 8: { LogStep(8, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7681,19 +7858,21 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 10: { LogStep(10, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), 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)); 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.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional @@ -7708,6 +7887,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 13: { LogStep(13, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7720,6 +7900,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 15: { LogStep(15, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7732,19 +7913,21 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 17: { LogStep(17, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), 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)); 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 = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional @@ -7752,14 +7935,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)); 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.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional @@ -7774,6 +7958,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 21: { LogStep(21, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7786,6 +7971,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 23: { LogStep(23, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7798,19 +7984,21 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 25: { LogStep(25, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), 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)); 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.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional @@ -7818,14 +8006,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)); 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.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional @@ -7840,6 +8029,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 29: { LogStep(29, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7852,6 +8042,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 31: { LogStep(31, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -7864,6 +8055,7 @@ class Test_TC_CC_6_2Suite : public TestCommand } case 33: { LogStep(33, "Read current color temprature attribute from DUT several times"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -8082,11 +8274,13 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 3: { LogStep(3, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; value.stepMode = static_cast(1); @@ -8094,8 +8288,8 @@ class Test_TC_CC_6_3Suite : public TestCommand value.transitionTime = 50U; value.colorTemperatureMinimumMireds = 5U; value.colorTemperatureMaximumMireds = 100U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, value, chip::NullOptional @@ -8110,6 +8304,7 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 6: { LogStep(6, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -8122,6 +8317,7 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 8: { LogStep(8, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -8134,11 +8330,13 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 10: { LogStep(10, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; value.stepMode = static_cast(3); @@ -8146,8 +8344,8 @@ class Test_TC_CC_6_3Suite : public TestCommand value.transitionTime = 50U; value.colorTemperatureMinimumMireds = 5U; value.colorTemperatureMaximumMireds = 100U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, value, chip::NullOptional @@ -8162,6 +8360,7 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 13: { LogStep(13, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -8174,6 +8373,7 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 15: { LogStep(15, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -8186,6 +8386,7 @@ class Test_TC_CC_6_3Suite : public TestCommand } case 17: { LogStep(17, "Read current color temprature"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -8497,13 +8698,14 @@ class Test_TC_CC_7_1Suite : public TestCommand } case 3: { LogStep(3, "Enhanced Move To Hue command"); + VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), 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 = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional @@ -8511,18 +8713,20 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; value.enhancedHue = 1100U; value.direction = static_cast(0); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional @@ -8537,6 +8741,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -8549,6 +8754,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -8561,18 +8767,20 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; value.enhancedHue = 1150U; value.direction = static_cast(1); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional @@ -8587,6 +8795,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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); } @@ -8599,6 +8808,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -8611,18 +8821,20 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; value.enhancedHue = 1200U; value.direction = static_cast(2); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional @@ -8637,6 +8849,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -8649,6 +8862,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -8661,18 +8875,20 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; value.enhancedHue = 1300U; value.direction = static_cast(3); value.transitionTime = 300U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional @@ -8687,6 +8903,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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); } @@ -8699,6 +8916,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -8711,6 +8929,7 @@ class Test_TC_CC_7_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -8955,17 +9174,19 @@ class Test_TC_CC_7_2Suite : public TestCommand } case 3: { LogStep(3, "Check 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 Hue Up 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(1); value.rate = 50U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, chip::NullOptional @@ -8980,6 +9201,7 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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); } @@ -8992,6 +9214,7 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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); } @@ -9004,17 +9227,19 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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 = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, chip::NullOptional @@ -9022,17 +9247,19 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Enhanced Move Hue Down command "); + LogStep(13, "Enhanced Move Hue Down 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(3); value.rate = 5U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, chip::NullOptional @@ -9047,6 +9274,7 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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); } @@ -9059,6 +9287,7 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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); } @@ -9071,17 +9300,19 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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 = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, chip::NullOptional @@ -9089,6 +9320,7 @@ class Test_TC_CC_7_2Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -9251,18 +9483,20 @@ class Test_TC_CC_7_3Suite : public TestCommand } 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 = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, chip::NullOptional @@ -9277,18 +9511,20 @@ class Test_TC_CC_7_3Suite : public TestCommand } case 6: { LogStep(6, "Over TransitionTime,Read 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 7: { LogStep(7, "Enhanced Step Hue Down 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(1); value.stepSize = 75U; value.transitionTime = 1U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, chip::NullOptional @@ -9303,6 +9539,7 @@ class Test_TC_CC_7_3Suite : public TestCommand } case 9: { LogStep(9, "Over TransitionTime,Read 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); } @@ -9448,18 +9685,20 @@ class Test_TC_CC_7_4Suite : public TestCommand } 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 = 90; + value.saturation = 90U; value.transitionTime = 10U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional @@ -9474,6 +9713,7 @@ class Test_TC_CC_7_4Suite : public TestCommand } 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); } @@ -9554,8 +9794,8 @@ class Test_TC_CC_8_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 5: @@ -9567,8 +9807,8 @@ class Test_TC_CC_8_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 7: @@ -9581,8 +9821,8 @@ class Test_TC_CC_8_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 9: @@ -9594,8 +9834,8 @@ class Test_TC_CC_8_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 11: @@ -9607,8 +9847,8 @@ class Test_TC_CC_8_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 13: @@ -9621,8 +9861,8 @@ class Test_TC_CC_8_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 15: @@ -9822,12 +10062,13 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 3: { LogStep(3, "Move hue up 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(1); - value.rate = 50; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 50U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, chip::NullOptional @@ -9835,15 +10076,17 @@ 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, chip::NullOptional @@ -9851,6 +10094,7 @@ 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } @@ -9863,17 +10107,19 @@ class Test_TC_CC_8_1Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(1); - value.rate = 5; - value.optionsMask = 0; - value.optionsOverride = 0; + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional @@ -9881,15 +10127,17 @@ 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, chip::NullOptional @@ -9897,6 +10145,7 @@ 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } @@ -9909,17 +10158,19 @@ class Test_TC_CC_8_1Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; value.rateX = 15; value.rateY = 20; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, chip::NullOptional @@ -9927,20 +10178,23 @@ 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)); 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, chip::NullOptional @@ -9948,11 +10202,13 @@ 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)); 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } @@ -9965,24 +10221,27 @@ class Test_TC_CC_8_1Suite : public TestCommand } 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)); 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)); 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)); 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 = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, value, chip::NullOptional @@ -9990,15 +10249,17 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 25: { LogStep(25, "Reads current color temprature from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, chip::NullOptional @@ -10006,6 +10267,7 @@ 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } @@ -10018,17 +10280,19 @@ class Test_TC_CC_8_1Suite : public TestCommand } 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(1); value.rate = 50U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, chip::NullOptional @@ -10036,15 +10300,17 @@ 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)); 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)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, chip::NullOptional @@ -10052,6 +10318,7 @@ 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -10064,6 +10331,7 @@ class Test_TC_CC_8_1Suite : public TestCommand } 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)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } @@ -10087,34 +10355,31 @@ class Test_TC_CC_8_1Suite : public TestCommand class Test_TC_CC_9_1Suite : public TestCommand { public: - Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 54, credsIssuerConfig) + Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 71, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_CC_9_1Suite() {} - 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(400)); } private: chip::Optional mNodeId; + chip::Optional mTimeout; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; - uint16_t EnhancedCurrentHueValue1; + uint16_t ColorLoopStartEnhancedHue; uint16_t ColorLoopStoredEnhancedHueValue1; - uint16_t EnhancedCurrentHueValue2; + uint16_t ColorLoopStartEnhancedHue2; uint16_t ColorLoopStoredEnhancedHueValue2; - uint16_t EnhancedCurrentHueValue3; + uint16_t ColorLoopStartEnhancedHue3; uint16_t ColorLoopStoredEnhancedHueValue3; - uint16_t EnhancedCurrentHueValue4; + uint16_t ColorLoopStartEnhancedHue4; uint16_t ColorLoopStoredEnhancedHue4; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -10148,28 +10413,31 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } 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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0)); + VerifyOrReturn(CheckValue("colorLoopDirection", 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)); { uint16_t value; @@ -10177,10 +10445,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } 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; @@ -10188,46 +10456,74 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } 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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 13: + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); + } + break; + case 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")); - EnhancedCurrentHueValue1 = value; + ColorLoopStartEnhancedHue = value; } break; - case 14: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, EnhancedCurrentHueValue1)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 15: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 16: + 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(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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 17: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10236,7 +10532,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueValue1 = value; } break; - case 18: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10244,57 +10540,85 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue1)); } break; - case 19: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1)); + VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } 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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 23: + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); + } + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + 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")); - EnhancedCurrentHueValue2 = value; + ColorLoopStartEnhancedHue2 = value; } break; - case 24: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, EnhancedCurrentHueValue2)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue2)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 25: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 26: + 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(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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 27: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10303,7 +10627,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueValue2 = value; } break; - case 28: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10311,14 +10635,14 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue2)); } break; - case 29: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10326,57 +10650,85 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 40960U)); } break; - case 32: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0)); + VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 34: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 35: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 36: + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); + } + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - EnhancedCurrentHueValue3 = value; + ColorLoopStartEnhancedHue3 = value; } break; - case 37: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, EnhancedCurrentHueValue3)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue3)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 38: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 39: + 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(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 40: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10385,7 +10737,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueValue3 = value; } break; - case 41: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10393,57 +10745,85 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue3)); } break; - case 42: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1)); + VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 44: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 45: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 46: + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); + } + break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - EnhancedCurrentHueValue4 = value; + ColorLoopStartEnhancedHue4 = value; } break; - case 47: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, EnhancedCurrentHueValue4)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHue3)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 48: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 49: + 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, ColorLoopStartEnhancedHue4)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 65: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 50: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10452,7 +10832,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHue4 = value; } break; - case 51: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -10460,10 +10840,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHue4)); } break; - case 52: + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 53: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -10502,488 +10882,607 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); + LogStep(2, "Precondition : 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, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); + VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 16384U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); + } + case 4: { + LogStep(4, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 4: { - LogStep(4, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 6: { - LogStep(6, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPDIRECTION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(4); + value.updateFlags = static_cast>(4U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 30U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 8: { - LogStep(8, "Read ColorLoopTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Read ColorLoopTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(8); + value.updateFlags = static_cast>(8U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 160U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 10: { - LogStep(10, "Read ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } case 13: { - LogStep(13, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + LogStep(13, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + } + case 17: { + LogStep(17, "Read 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 18: { + LogStep(18, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "Read 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 20: { + LogStep(20, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 16: { - LogStep(16, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 23: { + LogStep(23, "Read 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 19: { - LogStep(19, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2U); value.action = static_cast(0); value.direction = static_cast(1); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 20: { - LogStep(20, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPDIRECTION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 22: { - LogStep(22, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 28: { + LogStep(28, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 30: { + LogStep(30, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + } + case 31: { + LogStep(31, "Read 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 24: { - LogStep(24, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); + case 32: { + LogStep(32, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "Read 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 34: { + LogStep(34, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 26: { - LogStep(26, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 35: { + LogStep(35, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 37: { + LogStep(37, "Read 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 29: { - LogStep(29, "Enhanced Move To Hue command"); - VerifyOrDo(!ShouldSkip("CR_ENHANCEDMOVETOHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 38: { + LogStep(38, "Enhanced Move To Hue command"); + VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; value.enhancedHue = 40960U; value.direction = static_cast(0); value.transitionTime = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional ); } - case 30: { - LogStep(30, "Wait 2000ms"); + case 39: { + LogStep(39, "Wait 2000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 40: { + LogStep(40, "Read 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 32: { - LogStep(32, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 41: { + LogStep(41, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 33: { - LogStep(33, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPDIRECTION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 42: { + LogStep(42, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 43: { + LogStep(43, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(2); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 35: { - LogStep(35, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 44: { + LogStep(44, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 45: { + LogStep(45, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); + } + case 46: { + LogStep(46, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 47: { + LogStep(47, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + } + case 48: { + LogStep(48, "Read 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 37: { - LogStep(37, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); + case 49: { + LogStep(49, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); } - case 38: { - LogStep(38, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 50: { + LogStep(50, "Read 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 51: { + LogStep(51, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 39: { - LogStep(39, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 52: { + LogStep(52, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 53: { + LogStep(53, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 54: { + LogStep(54, "Read 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 42: { - LogStep(42, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 55: { + LogStep(55, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2U); value.action = static_cast(0); value.direction = static_cast(1); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 43: { - LogStep(43, "Read ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPDIRECTION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 56: { + LogStep(56, "Read ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 57: { + LogStep(57, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(2); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 45: { - LogStep(45, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 58: { + LogStep(58, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 59: { + LogStep(59, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); + } + case 60: { + LogStep(60, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 61: { + LogStep(61, "Read ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + } + case 62: { + LogStep(62, "Read 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 47: { - LogStep(47, "Read ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); + case 63: { + LogStep(63, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); } - case 48: { - LogStep(48, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 64: { + LogStep(64, "Read 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 65: { + LogStep(65, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 49: { - LogStep(49, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 66: { + LogStep(66, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 50: { - LogStep(50, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 67: { + LogStep(67, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 68: { + LogStep(68, "Read 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 52: { - LogStep(52, "Turn Off light for color control tests"); + case 69: { + LogStep(69, "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 53: { - LogStep(53, "Check on/off attribute value is false after off command"); + case 70: { + LogStep(70, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -10994,7 +11493,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", 20, credsIssuerConfig) + Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -11004,10 +11503,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ~Test_TC_CC_9_2Suite() {} - 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(400)); } private: chip::Optional mNodeId; @@ -11015,7 +11511,8 @@ class Test_TC_CC_9_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint16_t EnhancedCurrentHueValue; + uint16_t ColorLoopStartEnhancedHueValue; + uint16_t ColorLoopStartEnhancedHue1; uint16_t ColorLoopStoredEnhancedHueValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -11050,26 +11547,21 @@ class Test_TC_CC_9_2Suite : public TestCommand break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); - } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); + VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; case 7: @@ -11077,7 +11569,7 @@ class Test_TC_CC_9_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); + VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; case 8: @@ -11085,8 +11577,7 @@ class Test_TC_CC_9_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - EnhancedCurrentHueValue = value; + VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; case 9: @@ -11097,7 +11588,7 @@ class Test_TC_CC_9_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; case 11: @@ -11105,32 +11596,106 @@ class Test_TC_CC_9_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, EnhancedCurrentHueValue)); + VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } 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; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopDirection", value, 1)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + ColorLoopStartEnhancedHueValue = value; } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } 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, ColorLoopStartEnhancedHueValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 16: + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + ColorLoopStartEnhancedHue1 = value; + } + 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, ColorLoopStartEnhancedHue1)); + 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, ColorLoopStartEnhancedHue1)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); + } + break; + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11139,7 +11704,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 17: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11147,10 +11712,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 18: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -11193,64 +11758,73 @@ class Test_TC_CC_9_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); + VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 16384U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); + } + case 4: { + LogStep(4, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(15); + value.updateFlags = static_cast>(15U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 30U; value.startHue = 160U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 4: { - LogStep(4, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPDIRECTION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "Read ColorLoopDirection attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Read ColorLoopTime attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); - } case 9: { LogStep(9, "Color Loop Set Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional @@ -11258,84 +11832,148 @@ class Test_TC_CC_9_2Suite : public TestCommand } case 10: { LogStep(10, "Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), 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 11: { LogStep(11, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "Read 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 15: { + LogStep(15, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "Read 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 17: { + LogStep(17, "Color Loop Set Command - Start Color Loop"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(2); + value.updateFlags = static_cast>(2U); value.action = static_cast(0); value.direction = static_cast(1); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 13: { - LogStep(13, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPDIRECTION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Read ColorLoopDirection attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "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 ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + } + case 21: { + LogStep(21, "Read 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 22: { + LogStep(22, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 23: { + LogStep(23, "Read 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 24: { + LogStep(24, "Color Loop Set Command - Start Color Loop"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 15: { - LogStep(15, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "Read 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 18: { - LogStep(18, "Turn off light for color control tests"); + case 28: { + LogStep(28, "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 19: { - LogStep(19, "Check on/off attribute value is false after off command"); + case 29: { + LogStep(29, "Check on/off attribute value is false after off command"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } @@ -11346,7 +11984,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", 20, credsIssuerConfig) + Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -11356,10 +11994,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ~Test_TC_CC_9_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(400)); } private: chip::Optional mNodeId; @@ -11367,7 +12002,7 @@ class Test_TC_CC_9_3Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint16_t EnhancedCurrentHueValue; + uint16_t ColorLoopStartEnhancedHueValue; uint16_t ColorLoopStoredEnhancedHueValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -11401,22 +12036,25 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } 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(CheckValue("colorLoopDirection", value, 0)); + VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11424,7 +12062,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11432,38 +12070,66 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } 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)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 1)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } 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(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - EnhancedCurrentHueValue = value; + ColorLoopStartEnhancedHueValue = value; } break; - case 11: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, EnhancedCurrentHueValue)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } 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(CheckConstraintMinValue("value", value, ColorLoopStartEnhancedHueValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11471,18 +12137,46 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 60U)); } break; - case 14: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 15: + 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(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + 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", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorLoopActive", value, 0)); + VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 16: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11491,7 +12185,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 17: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -11499,10 +12193,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 18: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 19: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -11545,149 +12239,216 @@ class Test_TC_CC_9_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "Sends ColorLoopSet Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); + VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 16384U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); + } + case 4: { + LogStep(4, "Sends ColorLoopSet Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(15); + value.updateFlags = static_cast>(15U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 30U; value.startHue = 160U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 4: { - LogStep(4, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read ColorLoopDirection attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPDIRECTION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "Read ColorLoopDirection attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "Read ColorLoopTime attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read ColorLoopStartEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Color Loop Set Command - Set all Attributes"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "Color Loop Set Command - Set all Attributes"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(1); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 9: { - LogStep(9, "Read ColorLoopActive attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); - } case 10: { - LogStep(10, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + LogStep(10, "Read ColorLoopActive attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } case 11: { LogStep(11, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "Read ColorLoopStartEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "Read 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 15: { + LogStep(15, "Wait for 30S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "Read 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 17: { + LogStep(17, "Color Loop Set Command - Start Color Loop"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(4); + value.updateFlags = static_cast>(4U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 60U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 13: { - LogStep(13, "Read ColorLoopTime attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 18: { + LogStep(18, "Read ColorLoopTime attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Color Loop Set Command - Start Color Loop"); - VerifyOrDo(!ShouldSkip("CR_COLORLOOPSET"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "Wait for 60S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 60000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 20: { + LogStep(20, "Read 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 21: { + LogStep(21, "Wait for 60S"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 60000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 22: { + LogStep(22, "Read 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 23: { + LogStep(23, "Color Loop Set Command - Start Color Loop"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; - value.updateFlags = static_cast>(1); + value.updateFlags = static_cast>(1U); value.action = static_cast(0); value.direction = static_cast(0); value.time = 0U; value.startHue = 0U; - value.optionsMask = 0; - value.optionsOverride = 0; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::ColorLoopSet::Id, value, chip::NullOptional ); } - case 15: { - LogStep(15, "Read ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_COLORLOOPACTIVE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 24: { + LogStep(24, "Read ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read ColorLoopStoredEnhancedHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Read EnhancedCurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_ENHANCEDCURRENTHUE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 26: { + LogStep(26, "Read 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 18: { - LogStep(18, "Turn off light for color control tests"); + case 27: { + LogStep(27, "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 19: { - LogStep(19, "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); } } @@ -12037,7 +12798,7 @@ class Test_TC_DM_2_1Suite : public TestCommand class Test_TC_DESC_1_1Suite : public TestCommand { public: - Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 6, credsIssuerConfig) + Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12097,10 +12858,36 @@ class Test_TC_DESC_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 9)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -12112,7 +12899,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -12162,12 +12949,23 @@ class Test_TC_DESC_1_1Suite : public TestCommand chip::NullOptional); } case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); + LogStep(4, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -12353,8 +13151,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 2: @@ -12911,7 +13709,7 @@ class Test_TC_FLW_1_1Suite : public TestCommand class Test_TC_FLW_2_1Suite : public TestCommand { public: - Test_TC_FLW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_2_1", 14, credsIssuerConfig) + Test_TC_FLW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_2_1", 5, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12973,51 +13771,6 @@ class Test_TC_FLW_2_1Suite : public TestCommand } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - } - 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", "", "uint16")); - } - 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", "", "uint16")); - } - break; - case 10: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("tolerance", value, 0U)); - } - break; - case 11: if (IsUnsupported(status.mStatus)) { return; @@ -13031,21 +13784,6 @@ class Test_TC_FLW_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 13: - if (IsUnsupported(status.mStatus)) - { - return; - } - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("tolerance", value, 0U)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -13069,82 +13807,22 @@ class Test_TC_FLW_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: MeasuredValue"); + LogStep(1, "Read the mandatory attribute: MeasuredValue"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "read the mandatory attribute: MinMeasuredValue"); + LogStep(2, "Read the mandatory attribute: MinMeasuredValue"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "read the mandatory attribute: MaxMeasuredValue"); + LogStep(3, "Read the mandatory attribute: MaxMeasuredValue"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "write the default value to optional attribute: MeasuredValue"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MeasuredValue::Id, value, chip::NullOptional, chip::NullOptional); - } - case 5: { - LogStep(5, "write the default value to optional attribute: MinMeasuredValue"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MinMeasuredValue::Id, value, chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "write the default value to optional attribute: MaxMeasuredValue"); - ListFreer listFreer; - chip::app::DataModel::Nullable value; - value.SetNonNull(); - value.Value() = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MaxMeasuredValue::Id, value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "read the mandatory attribute: MeasuredValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "read the mandatory attribute: MinMeasuredValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "read the mandatory attribute: MaxMeasuredValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "read the optional attribute: Tolerance"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id, - true, chip::NullOptional); - } - case 11: { - LogStep(11, "read the optional attribute: Tolerance"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id, - true, chip::NullOptional); - } - case 12: { - LogStep(12, "write the default value to optional attribute: Tolerance"); - ListFreer listFreer; - uint16_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "read the optional attribute: Tolerance"); + LogStep(4, "read the optional attribute: Tolerance"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); } @@ -13204,7 +13882,12 @@ class Test_TC_CGEN_1_1Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -13222,16 +13905,20 @@ class Test_TC_CGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); + VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 11)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } @@ -13305,13 +13992,8 @@ class Test_TC_CGEN_1_1Suite : public TestCommand } case 2: { LogStep(2, "Read the global attribute: FeatureMap"); - 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 ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, + GeneralCommissioning::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); @@ -13350,7 +14032,7 @@ class Test_TC_CGEN_1_1Suite : public TestCommand class Test_TC_CGEN_2_1Suite : public TestCommand { public: - Test_TC_CGEN_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_1", 7, credsIssuerConfig) + Test_TC_CGEN_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_2_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -13392,7 +14074,7 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { uint64_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("breadcrumb", value, 0ULL)); + VerifyOrReturn(CheckConstraintType("value", "", "uint64")); } break; case 2: @@ -13411,8 +14093,8 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; case 5: @@ -13420,8 +14102,8 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; case 6: @@ -13429,10 +14111,18 @@ class Test_TC_CGEN_2_1Suite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValue("basicCommissioningInfo.failSafeExpiryLengthSeconds", value.failSafeExpiryLengthSeconds, 60U)); - VerifyOrReturn( - CheckValue("basicCommissioningInfo.maxCumulativeFailsafeSeconds", value.maxCumulativeFailsafeSeconds, 900U)); + } + 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)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "bool")); } break; default: @@ -13486,11 +14176,27 @@ class Test_TC_CGEN_2_1Suite : public TestCommand GeneralCommissioning::Attributes::LocationCapability::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "TH1 reads BasicCommissioningInfo attribute from DUT"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, + "TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the BasicCommissioningInfo attribute has " + "the following field: FailSafeExpiryLengthSeconds field value is within a duration range of 0 to 65535"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, GeneralCommissioning::Attributes::BasicCommissioningInfo::Id, true, chip::NullOptional); } + case 7: { + LogStep(7, "Step 6 TC-CGEN-2.1"); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Step 6 is implicitly validating the attribute(BasicCommissioningInfo) constraints, as long " + "as the payload is being parsed successfullygarbage: not in length on purpose", + 134); + return UserPrompt(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "TH1 reads SupportsConcurrentConnection attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, + GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -13559,6 +14265,24 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 8UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); + } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; @@ -13622,6 +14346,7 @@ class Test_TC_DGGEN_1_1Suite : public TestCommand } case 3: { LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralDiagnostics::Id, GeneralDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -13739,8 +14464,8 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; case 11: @@ -14117,8 +14842,8 @@ class Test_TC_I_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; default: @@ -14907,7 +15632,7 @@ class Test_TC_ILL_1_1Suite : public TestCommand class Test_TC_ILL_2_1Suite : public TestCommand { public: - Test_TC_ILL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_1", 5, credsIssuerConfig) + Test_TC_ILL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_2_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14965,6 +15690,16 @@ class Test_TC_ILL_2_1Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); + } + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -14974,7 +15709,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 2048U)); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15015,12 +15750,17 @@ class Test_TC_ILL_2_1Suite : public TestCommand IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); } case 3: { - LogStep(3, "TH reads Tolerance attribute from DUT"); + LogStep(3, "TH reads MeasuredValue attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, - IlluminanceMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); + IlluminanceMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads LightSensorType attribute from DUT"); + LogStep(4, "TH reads Tolerance attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, + IlluminanceMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads LightSensorType attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::LightSensorType::Id, true, chip::NullOptional); } @@ -15281,7 +16021,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, 254)); + VerifyOrReturn(CheckValue("currentLevel", value, 254U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; @@ -15299,10 +16039,10 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("minLevel", value, 1)); + VerifyOrReturn(CheckValue("minLevel", value, 1U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; case 6: @@ -15386,7 +16126,7 @@ class Test_TC_LVL_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("options", value, 0)); + VerifyOrReturn(CheckValue("options", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "map8")); } break; @@ -15424,10 +16164,10 @@ class Test_TC_LVL_2_1Suite : public TestCommand LogStep(1, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254; + value.level = 254U; value.transitionTime = 0U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -15539,6 +16279,11 @@ class Test_TC_LVL_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + chip::app::DataModel::Nullable OnLevelValue; + chip::app::DataModel::Nullable OnTransitionTimeValue; + chip::app::DataModel::Nullable OffTransitionTimeValue; + chip::app::DataModel::Nullable StartUpCurrentLevelValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -15577,41 +16322,41 @@ class Test_TC_LVL_2_2Suite : public TestCommand } break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + OnLevelValue = value; } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("onLevel", value)); - VerifyOrReturn(CheckValue("onLevel.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("onLevel.Value()", value.Value(), 254U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintNotValue("value", value, OnLevelValue)); } break; - case 8: + 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", "", "uint16")); + OnTransitionTimeValue = value; } break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15619,20 +16364,22 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("onTransitionTime", value)); VerifyOrReturn(CheckValue("onTransitionTime.Value()", value.Value(), 100U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintNotValue("value", value, OnTransitionTimeValue)); } break; - case 11: + 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", "", "uint16")); + OffTransitionTimeValue = value; } break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -15640,52 +16387,58 @@ class Test_TC_LVL_2_2Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("offTransitionTime", value)); VerifyOrReturn(CheckValue("offTransitionTime.Value()", value.Value(), 100U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintNotValue("value", value, OffTransitionTimeValue)); } break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("defaultMoveRate", value)); - VerifyOrReturn(CheckValue("defaultMoveRate.Value()", value.Value(), 50)); + VerifyOrReturn(CheckValue("defaultMoveRate.Value()", value.Value(), 50U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("defaultMoveRate", value)); - VerifyOrReturn(CheckValue("defaultMoveRate.Value()", value.Value(), 100)); + VerifyOrReturn(CheckValue("defaultMoveRate.Value()", value.Value(), 100U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; - case 17: + 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", "", "uint8")); + StartUpCurrentLevelValue = value; } 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)); { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", value)); - VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", value.Value(), 254U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); + VerifyOrReturn(CheckConstraintNotValue("value", value, StartUpCurrentLevelValue)); } break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -15727,39 +16480,31 @@ class Test_TC_LVL_2_2Suite : public TestCommand LevelControl::Attributes::OnOffTransitionTime::Id, true, chip::NullOptional); } case 4: { - LogStep(4, "writes default value of 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, "Reads the OnLevel attribute from the DUT"); + LogStep(4, "Reads the OnLevel attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "writes the OnLevel attribute on the DUT"); + case 5: { + LogStep(5, "writes the OnLevel attribute on the DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 254; + value.Value() = 254U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, value, chip::NullOptional, chip::NullOptional); } - case 7: { - LogStep(7, "Reads the OnLevel attribute from the DUT"); + case 6: { + LogStep(6, "Reads the OnLevel attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Reads the OnTransitionTime attribute from the DUT"); + case 7: { + LogStep(7, "Reads the OnTransitionTime attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Writes the OnTransitionTime attribute on the DUT"); + case 8: { + LogStep(8, "Writes the OnTransitionTime attribute on the DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -15767,18 +16512,18 @@ class Test_TC_LVL_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); } - case 10: { - LogStep(10, "Reads the OnTransitionTime attribute from the DUT"); + case 9: { + LogStep(9, "Reads the OnTransitionTime attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnTransitionTime::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Reads the OffTransitionTime attribute from the DUT"); + case 10: { + LogStep(10, "Reads the OffTransitionTime attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Writes the OffTransitionTime attribute on the DUT"); + case 11: { + LogStep(11, "Writes the OffTransitionTime attribute on the DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); @@ -15786,49 +16531,57 @@ class Test_TC_LVL_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); } - case 13: { - LogStep(13, "Reads the OffTransitionTime attribute from the DUT"); + case 12: { + LogStep(12, "Reads the OffTransitionTime attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OffTransitionTime::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Reads the DefaultMoveRate attribute from the DUT"); + case 13: { + LogStep(13, "Reads the DefaultMoveRate attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Writes the DefaultMoveRate attribute on the DUT"); + case 14: { + LogStep(14, "Writes the DefaultMoveRate attribute on the DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 100; + value.Value() = 100U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "Reads the DefaultMoveRate attribute from the DUT"); + case 15: { + LogStep(15, "Reads the DefaultMoveRate attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::DefaultMoveRate::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Reads the StartUpCurrentLevel attribute from the DUT"); + case 16: { + LogStep(16, "Reads the StartUpCurrentLevel attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "writes the StartUpCurrentLevel attribute on the DUT"); + case 17: { + LogStep(17, "writes the StartUpCurrentLevel attribute on the DUT"); ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 254; + value.Value() = 254U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id, value, chip::NullOptional, chip::NullOptional); } - case 19: { - LogStep(19, "reads the StartUpCurrentLevel attribute from the DUT"); + case 18: { + LogStep(18, "reads the StartUpCurrentLevel attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::StartUpCurrentLevel::Id, true, chip::NullOptional); } + case 19: { + LogStep(19, "writes back default value of OnOffTransitionTime attribute"); + ListFreer listFreer; + uint16_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, + LevelControl::Attributes::OnOffTransitionTime::Id, value, chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -15910,7 +16663,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, 64)); + VerifyOrReturn(CheckValue("currentLevel", value, 64U)); } break; case 7: @@ -15925,7 +16678,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, 100)); + VerifyOrReturn(CheckValue("currentLevel", value, 100U)); } break; case 10: @@ -15948,7 +16701,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, 128)); + VerifyOrReturn(CheckValue("currentLevel", value, 128U)); } break; case 14: @@ -15999,10 +16752,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand LogStep(4, "sends a Move to level command"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 64; + value.level = 64U; value.transitionTime = 65535U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -16024,10 +16777,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand LogStep(7, "sends a Move to level command"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 100; + value.level = 100U; value.transitionTime = 100U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -16054,10 +16807,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand LogStep(11, "sends a Move to level command"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 128; + value.level = 128U; value.transitionTime = 65535U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -16079,10 +16832,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand LogStep(14, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254; + value.level = 254U; value.transitionTime = 0U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -16197,9 +16950,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentLevel", value, 1)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1)); + VerifyOrReturn(CheckValue("currentLevel", value, 1U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; case 11: @@ -16223,7 +16976,7 @@ class Test_TC_LVL_4_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 255)); + VerifyOrReturn(CheckConstraintNotValue("value", value, 255U)); } break; case 15: @@ -16269,9 +17022,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; value.moveMode = static_cast(0); - value.rate = 32; - value.optionMask = 1; - value.optionOverride = 1; + value.rate = 32U; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional @@ -16309,9 +17062,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; value.moveMode = static_cast(1); - value.rate = 64; - value.optionMask = 1; - value.optionOverride = 1; + value.rate = 64U; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional @@ -16349,9 +17102,9 @@ class Test_TC_LVL_4_1Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; value.moveMode = static_cast(0); - value.rate = 255; - value.optionMask = 1; - value.optionOverride = 1; + value.rate = 255U; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional @@ -16382,10 +17135,10 @@ class Test_TC_LVL_4_1Suite : public TestCommand LogStep(16, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254; + value.level = 254U; value.transitionTime = 0U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -16539,10 +17292,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type value; value.stepMode = static_cast(1); - value.stepSize = 100; + value.stepSize = 100U; value.transitionTime = 20U; - value.optionMask = 0; - value.optionOverride = 0; + value.optionMask = 0U; + value.optionOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, chip::NullOptional @@ -16565,10 +17318,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type value; value.stepMode = static_cast(0); - value.stepSize = 64; + value.stepSize = 64U; value.transitionTime = 2U; - value.optionMask = 0; - value.optionOverride = 0; + value.optionMask = 0U; + value.optionOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, chip::NullOptional @@ -16591,10 +17344,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Step::Type value; value.stepMode = static_cast(1); - value.stepSize = 64; + value.stepSize = 64U; value.transitionTime = 2U; - value.optionMask = 0; - value.optionOverride = 0; + value.optionMask = 0U; + value.optionOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Step::Id, value, chip::NullOptional @@ -16616,10 +17369,10 @@ class Test_TC_LVL_5_1Suite : public TestCommand LogStep(11, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254; + value.level = 254U; value.transitionTime = 0U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -16702,8 +17455,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); CurrentLevelValue = value; } break; @@ -16769,10 +17522,10 @@ class Test_TC_LVL_6_1Suite : public TestCommand LogStep(2, "Precondition: set DUT to lowest point"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 0; + value.level = 0U; value.transitionTime = 0U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -16795,9 +17548,9 @@ class Test_TC_LVL_6_1Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Move::Type value; value.moveMode = static_cast(0); - value.rate = 1; - value.optionMask = 1; - value.optionOverride = 1; + value.rate = 1U; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Move::Id, value, chip::NullOptional @@ -16814,8 +17567,8 @@ class Test_TC_LVL_6_1Suite : public TestCommand LogStep(7, "Sends stop command to DUT"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::Stop::Type value; - value.optionMask = 0; - value.optionOverride = 0; + value.optionMask = 0U; + value.optionOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::Stop::Id, value, chip::NullOptional @@ -16830,10 +17583,10 @@ class Test_TC_LVL_6_1Suite : public TestCommand LogStep(9, "Reset level to 254"); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; - value.level = 254; + value.level = 254U; value.transitionTime = 0U; - value.optionMask = 1; - value.optionOverride = 1; + value.optionMask = 1U; + value.optionOverride = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Commands::MoveToLevel::Id, value, chip::NullOptional @@ -17671,6 +18424,15 @@ class Test_TC_MC_1_5Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17688,17 +18450,19 @@ class Test_TC_MC_1_5Suite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 7)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 3: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17710,7 +18474,7 @@ class Test_TC_MC_1_5Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -17722,184 +18486,175 @@ class Test_TC_MC_1_5Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the global attribute constraints: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MC_1_6Suite : public TestCommand +{ +public: + Test_TC_MC_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_6", 8, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_1_6Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + } + 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")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 8)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; case 6: - 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: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::AcceptedCommandList::Id, - true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::GeneratedCommandList::Id, - true, chip::NullOptional); - } - case 6: { - LogStep(6, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); - 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_MC_1_6Suite : public TestCommand -{ -public: - Test_TC_MC_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_6", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MC_1_6Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - } - 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")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 65528UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 8)); - } - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "list")); - } - 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")); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -17985,7 +18740,7 @@ class Test_TC_MC_1_6Suite : public TestCommand class Test_TC_MC_1_7Suite : public TestCommand { public: - Test_TC_MC_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_7", 6, credsIssuerConfig) + Test_TC_MC_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_7", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18068,6 +18823,10 @@ class Test_TC_MC_1_7Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18101,7 +18860,7 @@ class Test_TC_MC_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -18115,7 +18874,7 @@ class Test_TC_MC_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; @@ -18153,19 +18912,30 @@ class Test_TC_MC_1_7Suite : public TestCommand true, chip::NullOptional); } case 3: { - LogStep(3, "Read the global attribute: AcceptedCommandList"); + LogStep(3, + "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "Read the global attribute: GeneratedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, + case 6: { + LogStep(6, "Read FeatureMap attribute from the DUT and Verify that the DUT values based on feature/PICS support:Bit 0 - " "Set to 1 if the DUT supports Advanced Seek (PICS_ADVANCEDSEEK is true) Bit 1 - Set to 1 if the DUT supports " "Variable Speed (PICS_VARIABLESPEED is true)"); @@ -18576,7 +19346,7 @@ class Test_TC_MC_1_9Suite : public TestCommand class Test_TC_MC_1_10Suite : public TestCommand { public: - Test_TC_MC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_10", 8, credsIssuerConfig) + Test_TC_MC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_1_10", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18619,14 +19389,16 @@ class Test_TC_MC_1_10Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); } break; case 3: @@ -18637,32 +19409,26 @@ class Test_TC_MC_1_10Suite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 0)); - VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 0UL)); + VerifyOrReturn(CheckValue("attributeList[0]", iter_0.GetValue(), 2UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 1)); - VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); + VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 4UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); - VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); + VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 5UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); - VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 6UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); - VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 4UL)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 7UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); - VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 5UL)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65528UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); - VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 6UL)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65529UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); - VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 7UL)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65531UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); - VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65532UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); - VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65529UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 10)); - VerifyOrReturn(CheckValue("attributeList[10]", iter_0.GetValue(), 65531UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 11)); - VerifyOrReturn(CheckValue("attributeList[11]", iter_0.GetValue(), 65532UL)); - VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 12)); - VerifyOrReturn(CheckValue("attributeList[12]", iter_0.GetValue(), 65533UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 13)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 10)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } @@ -18701,10 +19467,6 @@ class Test_TC_MC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -18733,9 +19495,9 @@ class Test_TC_MC_1_10Suite : public TestCommand ApplicationBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute constraints: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, - ApplicationBasic::Attributes::ClusterRevision::Id, true, chip::NullOptional); + LogStep(2, "Read FeatureMap attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::FeatureMap::Id, + true, chip::NullOptional); } case 3: { LogStep(3, "Read the global attribute: AttributeList"); @@ -18766,18 +19528,6 @@ class Test_TC_MC_1_10Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a general error if the " - "attribute is not supported.."); - 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; } @@ -20027,7 +20777,7 @@ class Test_TC_MC_3_7Suite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 1)); + VerifyOrReturn(CheckValue("status", value.status, 1U)); VerifyOrReturn( CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); @@ -20038,7 +20788,7 @@ class Test_TC_MC_3_7Suite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 1)); + VerifyOrReturn(CheckValue("status", value.status, 1U)); VerifyOrReturn( CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); @@ -20049,7 +20799,7 @@ class Test_TC_MC_3_7Suite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2)); + VerifyOrReturn(CheckValue("status", value.status, 2U)); VerifyOrReturn( CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); @@ -20175,7 +20925,7 @@ class Test_TC_MC_3_8Suite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn( CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("Hello World"), 11))); @@ -20186,7 +20936,7 @@ class Test_TC_MC_3_8Suite : public TestCommand { chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value, 0)); + VerifyOrReturn(CheckValue("status", value, 0U)); } break; default: @@ -20288,7 +21038,7 @@ class Test_TC_MC_3_9Suite : public TestCommand { chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value, 0)); + VerifyOrReturn(CheckValue("status", value, 0U)); } break; default: @@ -20474,7 +21224,7 @@ class Test_TC_MC_3_11Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentInput", value, 1)); + VerifyOrReturn(CheckValue("currentInput", value, 1U)); } break; default: @@ -20509,7 +21259,7 @@ class Test_TC_MC_3_11Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; - value.index = 1; + value.index = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, chip::NullOptional @@ -20713,7 +21463,7 @@ class Test_TC_MC_3_13Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; - value.index = 1; + value.index = 1U; value.name = chip::Span("A1garbage: not in length on purpose", 2); return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, chip::NullOptional @@ -20725,7 +21475,7 @@ class Test_TC_MC_3_13Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; - value.index = 1; + value.index = 1U; value.name = chip::Span("A2garbage: not in length on purpose", 2); return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, chip::NullOptional @@ -21145,7 +21895,7 @@ class Test_TC_MC_7_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentOutput", value, 1)); + VerifyOrReturn(CheckValue("currentOutput", value, 1U)); } break; default: @@ -21180,7 +21930,7 @@ class Test_TC_MC_7_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type value; - value.index = 1; + value.index = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::SelectOutput::Id, value, chip::NullOptional @@ -21287,7 +22037,7 @@ class Test_TC_MC_7_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type value; - value.index = 1; + value.index = 1U; value.name = chip::Span("CertTestgarbage: not in length on purpose", 8); return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::RenameOutput::Id, value, chip::NullOptional @@ -21379,7 +22129,7 @@ class Test_TC_MC_8_1Suite : public TestCommand { chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 4: @@ -21387,7 +22137,7 @@ class Test_TC_MC_8_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1)); + VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); } break; case 5: @@ -21403,7 +22153,7 @@ class Test_TC_MC_8_1Suite : public TestCommand { chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; case 7: @@ -21411,7 +22161,7 @@ class Test_TC_MC_8_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2)); + VerifyOrReturn(CheckValue("currentTarget", value, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); } break; default: @@ -21451,7 +22201,7 @@ class Test_TC_MC_8_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1; + value.target = mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, value, chip::NullOptional @@ -21473,7 +22223,7 @@ class Test_TC_MC_8_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2; + value.target = mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, value, chip::NullOptional @@ -21581,8 +22331,8 @@ class Test_TC_MC_9_1Suite : public TestCommand { chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 8: @@ -24233,7 +24983,7 @@ class OTA_SuccessfulTransferSuite : public TestCommand listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1; + listHolder_0->mList[0].fabricIndex = 1U; listHolder_0->mList[1].privilege = static_cast(3); listHolder_0->mList[1].authMode = static_cast(2); @@ -24253,7 +25003,7 @@ class OTA_SuccessfulTransferSuite : public TestCommand chip::app::DataModel::List(listHolder_3->mList, 1); } - listHolder_0->mList[1].fabricIndex = 1; + listHolder_0->mList[1].fabricIndex = 1U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -24550,8 +25300,8 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; case 2: @@ -24562,7 +25312,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupancy", value, 0)); + VerifyOrReturn(CheckValue("occupancy", value, 0U)); } break; case 4: @@ -24570,7 +25320,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupancySensorType", value, 0)); + VerifyOrReturn(CheckValue("occupancySensorType", value, 0U)); } break; case 5: @@ -24579,8 +25329,8 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 6: @@ -24592,8 +25342,8 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 8: @@ -24602,8 +25352,8 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 273)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); } break; case 9: @@ -24615,8 +25365,8 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 273)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 273U)); } break; case 11: @@ -24703,7 +25453,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1)); + VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1U)); } break; case 19: @@ -24716,8 +25466,8 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 20: @@ -24736,7 +25486,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1)); + VerifyOrReturn(CheckValue("pirUnoccupiedToOccupiedThreshold", value, 1U)); } break; case 22: @@ -24812,10 +25562,10 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedThreshold", value, 1)); + VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedThreshold", value, 1U)); VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 29: @@ -24834,7 +25584,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedThreshold", value, 1)); + VerifyOrReturn(CheckValue("ultrasonicUnoccupiedToOccupiedThreshold", value, 1U)); } break; case 31: @@ -24932,7 +25682,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1)); + VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1U)); } break; case 40: @@ -24945,8 +25695,8 @@ class Test_TC_OCC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 41: @@ -24965,7 +25715,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1)); + VerifyOrReturn(CheckValue("physicalContactUnoccupiedToOccupiedThreshold", value, 1U)); } break; default: @@ -24999,7 +25749,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand LogStep(2, "Writes the respective default value to mandatory attribute: Occupancy"); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, value, chip::NullOptional, chip::NullOptional); } @@ -25022,7 +25772,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand LogStep(6, "Writes the respective default value to mandatory attribute: OccupancySensorType"); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id, value, chip::NullOptional, chip::NullOptional); @@ -25041,7 +25791,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand LogStep(9, "Writes the respective default value to mandatory attribute: OccupancySensorTypeBitmap"); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, value, chip::NullOptional, chip::NullOptional); @@ -25108,7 +25858,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand LogStep(20, "Writes the respective default value to optional attribute: PIRUnoccupiedToOccupiedThreshold"); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PirUnoccupiedToOccupiedThreshold::Id, value, chip::NullOptional, chip::NullOptional); @@ -25166,7 +25916,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand LogStep(29, "Writes the respective default value to optional attribute: UltrasonicUnoccupiedToOccupiedThreshold"); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::UltrasonicUnoccupiedToOccupiedThreshold::Id, value, chip::NullOptional, chip::NullOptional); @@ -25247,7 +25997,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand LogStep(41, "Writes the respective default value to optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold"); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::PhysicalContactUnoccupiedToOccupiedThreshold::Id, value, chip::NullOptional, chip::NullOptional); @@ -25919,10 +26669,10 @@ class Test_TC_OO_2_2Suite : public TestCommand } }; -class Test_TC_OO_2_3Suite : public TestCommand +class Test_TC_OO_2_4Suite : public TestCommand { public: - Test_TC_OO_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_3", 47, credsIssuerConfig) + Test_TC_OO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_4", 26, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25930,7 +26680,7 @@ class Test_TC_OO_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OO_2_3Suite() {} + ~Test_TC_OO_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -25964,55 +26714,44 @@ class Test_TC_OO_2_3Suite : 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)); { - bool value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); + VerifyOrReturn(CheckValueNonNull("startUpOnOff", value)); + VerifyOrReturn(CheckValue("startUpOnOff.Value()", value.Value(), 0U)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); - } + shouldContinue = true; break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); + VerifyOrReturn(CheckValue("onOff", value, 0)); } break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); - } break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -26020,729 +26759,70 @@ class Test_TC_OO_2_3Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } 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("globalSceneControl", value, 1)); - } + shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } + shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); + VerifyOrReturn(CheckValue("onOff", value, 0)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } + shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); + VerifyOrReturn(CheckValue("onOff", value, 1)); } break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } + shouldContinue = true; break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); + VerifyOrReturn(CheckValue("onOff", value, 1)); } break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } + 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(CheckValue("offWaitTime", value, 0U)); - } - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 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, 1)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 40: - 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 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 43: - 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 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onTime", value, 0U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Send On Command"); - VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Send On Command"); - VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 9: { - LogStep(9, "Send On Command"); - VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 10: { - LogStep(10, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "Reads GlobalSceneControl attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, - chip::NullOptional); - } - case 13: { - LogStep(13, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 14: { - LogStep(14, "Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, "Send On Command"); - VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 18: { - LogStep(18, "Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "Send Off Command"); - VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Send On Command"); - VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 26: { - LogStep(26, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "Send Off Command"); - VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 29: { - LogStep(29, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 30: { - LogStep(30, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 31: { - LogStep(31, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 33: { - LogStep(33, "Send On Command"); - VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 34: { - LogStep(34, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 35: { - LogStep(35, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 36: { - LogStep(36, "Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 37: { - LogStep(37, "Send Off Command"); - VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 38: { - LogStep(38, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 39: { - LogStep(39, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 40: { - LogStep(40, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 41: { - LogStep(41, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 42: { - LogStep(42, "Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 43: { - LogStep(43, "Reads OnOff attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 44: { - LogStep(44, "Reads OnTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "Reads OffWaitTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "Send Off Command"); - VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_2_4Suite : public TestCommand -{ -public: - Test_TC_OO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_4", 26, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OO_2_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNonNull("startUpOnOff", value)); - VerifyOrReturn(CheckValue("startUpOnOff.Value()", value.Value(), 0)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - 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)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + shouldContinue = true; break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -27166,8 +27246,8 @@ class Test_TC_PS_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 2: @@ -27208,8 +27288,8 @@ class Test_TC_PS_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; case 7: @@ -27282,8 +27362,8 @@ class Test_TC_PS_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; case 16: @@ -27300,8 +27380,8 @@ class Test_TC_PS_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 18: @@ -27389,8 +27469,8 @@ class Test_TC_PS_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 28: @@ -28465,8 +28545,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 16: @@ -28475,8 +28555,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; case 17: @@ -28551,8 +28631,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 23: @@ -28565,8 +28645,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 7)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7U)); } break; default: @@ -28759,7 +28839,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, 1)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 1U)); } break; case 3: @@ -28770,7 +28850,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, 2)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 2U)); } break; case 5: @@ -28781,7 +28861,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, 3)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 3U)); } break; default: @@ -28907,7 +28987,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpOperationMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveOperationMode", value, 0)); + VerifyOrReturn(CheckValue("effectiveOperationMode", value, 0U)); } break; case 3: @@ -28918,7 +28998,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 0)); + VerifyOrReturn(CheckValue("effectiveControlMode", value, 0U)); } break; case 5: @@ -28929,7 +29009,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 1)); + VerifyOrReturn(CheckValue("effectiveControlMode", value, 1U)); } break; case 7: @@ -28940,7 +29020,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 2)); + VerifyOrReturn(CheckValue("effectiveControlMode", value, 2U)); } break; case 9: @@ -28951,7 +29031,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 3)); + VerifyOrReturn(CheckValue("effectiveControlMode", value, 3U)); } break; case 11: @@ -28962,7 +29042,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 5)); + VerifyOrReturn(CheckValue("effectiveControlMode", value, 5U)); } break; case 13: @@ -28973,7 +29053,7 @@ class Test_TC_PCC_2_3Suite : public TestCommand { chip::app::Clusters::PumpConfigurationAndControl::PumpControlMode value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("effectiveControlMode", value, 7)); + VerifyOrReturn(CheckValue("effectiveControlMode", value, 7U)); } break; default: @@ -29390,11 +29470,17 @@ 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")); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -29475,13 +29561,8 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand } case 2: { LogStep(2, "TH reads the FeatureMap attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, + PowerSourceConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { LogStep(3, "TH reads the AttributeList attribute from the DUT"); @@ -29557,7 +29638,12 @@ class Test_TC_RH_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 3U)); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -29586,10 +29672,6 @@ class Test_TC_RH_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")); } break; @@ -29598,16 +29680,17 @@ class Test_TC_RH_1_1Suite : public TestCommand { 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")); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -29632,16 +29715,9 @@ class Test_TC_RH_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, - "Read ClusterRevision attribute from the DUT and Verify that the DUT response indicates ClusterRevision " - "attribute has the value 3"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter the Valuegarbage: not in length on purpose", 15); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("3garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "Read ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Read the global attribute: AttributeList"); @@ -29671,14 +29747,9 @@ class Test_TC_RH_1_1Suite : public TestCommand RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Read FeatureMap attribute from the DUT and Verify that the DUT response"); - 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 FeatureMap attribute valuegarbage: not in length on purpose", 39); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(6, "Read FeatureMap attribute from the DUT and Verify that the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -30029,7 +30100,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(CheckValue("commissioningMode", value.commissioningMode, 1)); + VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 1U)); } shouldContinue = true; break; @@ -30090,7 +30161,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(CheckConstraintMinValue("value.numIPs", value.numIPs, 1)); + VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1U)); } shouldContinue = true; break; @@ -30246,7 +30317,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(CheckValue("commissioningMode", value.commissioningMode, 1)); + VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 1U)); } shouldContinue = true; break; @@ -30307,7 +30378,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(CheckConstraintMinValue("value.numIPs", value.numIPs, 1)); + VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1U)); } shouldContinue = true; break; @@ -30730,9 +30801,9 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfPositions", value, 2)); + VerifyOrReturn(CheckValue("numberOfPositions", value, 2U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); } break; case 2: @@ -30740,9 +30811,9 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentPosition", value, 0)); + VerifyOrReturn(CheckValue("currentPosition", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); } break; case 3: @@ -30750,9 +30821,9 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("multiPressMax", value, 2)); + VerifyOrReturn(CheckValue("multiPressMax", value, 2U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 2)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 2U)); } break; default: @@ -30800,7 +30871,7 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand class Test_TC_TM_1_1Suite : public TestCommand { public: - Test_TC_TM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TM_1_1", 6, credsIssuerConfig) + Test_TC_TM_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TM_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -30839,9 +30910,23 @@ class Test_TC_TM_1_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "", "unit16")); + } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -30856,22 +30941,46 @@ class Test_TC_TM_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 4)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65530UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 10)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } 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; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -30896,39 +31005,25 @@ class Test_TC_TM_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, - "Read ClusterRevision attribute from the DUT and Verify that the DUT response indicates ClusterRevision " - "attribute has the value 4"); - 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 ClusterRevision attribute valuegarbage: not in length on purpose", 44); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("4garbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(1, "Read ClusterRevision attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Read FeatureMap attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); + TemperatureMeasurement::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, - "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); + LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && A_TEMPERATURE_TOLERANCE"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::AttributeList::Id, true, chip::NullOptional); } case 4: { LogStep(4, - "Read AcceptedCommandList attribute from the DUT and Verify that the DUT response provides a list of supported " - "commands,This list SHALL include all the mandatory commands."); + "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; @@ -30938,16 +31033,14 @@ class Test_TC_TM_1_1Suite : public TestCommand return UserPrompt(kIdentityAlpha, value); } case 5: { - LogStep(5, - "Read GeneratedCommandList attribute from the DUT and Verify that the DUT response provides a list of " - "supported commands."); - 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); + LogStep(5, "Read AcceptedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read GeneratedCommandList attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -31175,11 +31268,19 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -31204,13 +31305,16 @@ class Test_TC_TSTAT_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), Thermostat::Id, Thermostat::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { LogStep(2, "Read the optional global attribute constraints: FeatureMap"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo( + !ShouldSkip( + "PICS_SKIP_SAMPLE_APP && (TSTAT_HEAT || TSTAT_COOL || TSTAT_OCC || TSTAT_SCH || TSTAT_SB || TSTAT_AUTO)"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::FeatureMap::Id, true, chip::NullOptional); } @@ -31232,23 +31336,13 @@ class Test_TC_TSTAT_1_1Suite : public TestCommand } case 5: { LogStep(5, "Read the global attribute: AcceptedCommandList"); - 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 ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::AcceptedCommandList::Id, + true, chip::NullOptional); } case 6: { LogStep(6, "Read the global attribute: GeneratedCommandList"); - 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 ReadAttribute(kIdentityAlpha, GetEndpoint(1), Thermostat::Id, Thermostat::Attributes::GeneratedCommandList::Id, + true, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -31445,8 +31539,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; case 17: @@ -31455,8 +31549,8 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 18: @@ -31511,8 +31605,8 @@ class Test_TC_TSTAT_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; case 27: @@ -32579,10 +32673,10 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { chip::app::Clusters::Thermostat::ThermostatControlSequence value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 4)); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 4U)); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; case 58: @@ -32593,7 +32687,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand { chip::app::Clusters::Thermostat::ThermostatControlSequence value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 2)); + VerifyOrReturn(CheckValue("controlSequenceOfOperation", value, 2U)); } break; case 60: @@ -33440,7 +33534,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand class Test_TC_TSUIC_1_1Suite : public TestCommand { public: - Test_TC_TSUIC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_1_1", 6, credsIssuerConfig) + Test_TC_TSUIC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -33487,6 +33581,15 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "", "map32")); + } + break; + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33499,16 +33602,30 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand VerifyOrReturn(CheckValue("attributeList[1]", iter_0.GetValue(), 1UL)); VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 2)); VerifyOrReturn(CheckValue("attributeList[2]", iter_0.GetValue(), 2UL)); - VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 3)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 3)); + VerifyOrReturn(CheckValue("attributeList[3]", iter_0.GetValue(), 3UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 4)); + VerifyOrReturn(CheckValue("attributeList[4]", iter_0.GetValue(), 65528UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 5)); + VerifyOrReturn(CheckValue("attributeList[5]", iter_0.GetValue(), 65529UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 6)); + VerifyOrReturn(CheckValue("attributeList[6]", iter_0.GetValue(), 65530UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 7)); + VerifyOrReturn(CheckValue("attributeList[7]", iter_0.GetValue(), 65531UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 8)); + VerifyOrReturn(CheckValue("attributeList[8]", iter_0.GetValue(), 65532UL)); + VerifyOrReturn(CheckNextListItemDecodes("attributeList", iter_0, 9)); + VerifyOrReturn(CheckValue("attributeList[9]", iter_0.GetValue(), 65533UL)); + VerifyOrReturn(CheckNoMoreListItems("attributeList", iter_0, 10)); } VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 3: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 4: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33520,7 +33637,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -33560,13 +33677,19 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Read the global attribute: AttributeList"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "Read FeatureMap attribute from the DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); + ThermostatUserInterfaceConfiguration::Attributes::FeatureMap::Id, true, chip::NullOptional); } case 3: { - LogStep(3, + LogStep(3, "Read the global attribute: AttributeList"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && A_TEMPERATURE_TOLERANCE"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, + ThermostatUserInterfaceConfiguration::Attributes::AttributeList::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "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; @@ -33576,14 +33699,14 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); @@ -33596,7 +33719,7 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand class Test_TC_TSUIC_2_1Suite : public TestCommand { public: - Test_TC_TSUIC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_2_1", 7, credsIssuerConfig) + Test_TC_TSUIC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_2_1", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -33638,7 +33761,9 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("temperatureDisplayMode", value, 0)); + VerifyOrReturn(CheckConstraintType("value", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; case 2: @@ -33647,44 +33772,18 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("keypadLockout", value, 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", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("scheduleProgrammingVisibility", value, 0)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 1U)); } break; default: @@ -33710,35 +33809,18 @@ class Test_TC_TSUIC_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the mandatory attribute: TemperatureDisplayMode"); + LogStep(1, "Read the mandatory attribute: TemperatureDisplayMode"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "read the mandatory attribute: TemperatureDisplayMode"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "read the mandatory attribute: KeypadLockout"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "read the mandatory attribute: KeypadLockout"); + LogStep(2, "Read the mandatory attribute: KeypadLockout"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "read the optional attribute: ScheduleProgrammingVisibility"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, - ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "read the optional attribute: ScheduleProgrammingVisibility"); + case 3: { + LogStep(3, "Read the optional attribute: ScheduleProgrammingVisibility"); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, true, chip::NullOptional); @@ -33894,7 +33976,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, chip::NullOptional, chip::NullOptional); @@ -33912,7 +33994,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, chip::NullOptional, chip::NullOptional); @@ -33930,7 +34012,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_TEMPERATURE_DISPLAY_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 2; + value = 2U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, value, chip::NullOptional, chip::NullOptional); @@ -33940,7 +34022,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); @@ -33958,7 +34040,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); @@ -33976,7 +34058,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 2; + value = 2U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); @@ -33994,7 +34076,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 3; + value = 3U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); @@ -34012,7 +34094,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 4; + value = 4U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); @@ -34030,7 +34112,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 5; + value = 5U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); @@ -34048,7 +34130,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_KEYPAD_LOCKOUT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 6; + value = 6U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, value, chip::NullOptional, chip::NullOptional); @@ -34058,7 +34140,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, chip::NullOptional, chip::NullOptional); @@ -34077,7 +34159,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, chip::NullOptional, chip::NullOptional); @@ -34096,7 +34178,7 @@ class Test_TC_TSUIC_2_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_SCHEDULE_PROGRAMMING_VISIBILITY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; - value = 2; + value = 2U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ThermostatUserInterfaceConfiguration::Id, ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, value, chip::NullOptional, chip::NullOptional); @@ -34270,8 +34352,8 @@ class Test_TC_DIAG_TH_NW_1_2Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "RoutingRole")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; case 5: @@ -36142,6 +36224,229 @@ class Test_TC_ULABEL_2_3Suite : public TestCommand } }; +class Test_TC_ULABEL_2_4Suite : public TestCommand +{ +public: + Test_TC_ULABEL_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_4", 5, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_2_4Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 0)); + VerifyOrReturn(CheckValueAsString("labelList[0].label", iter_0.GetValue().label, chip::CharSpan("room", 4))); + VerifyOrReturn( + CheckValueAsString("labelList[0].value", iter_0.GetValue().value, chip::CharSpan("bedroom 1", 9))); + VerifyOrReturn(CheckNextListItemDecodes("labelList", iter_0, 1)); + VerifyOrReturn( + CheckValueAsString("labelList[1].label", iter_0.GetValue().label, chip::CharSpan("Orientation", 11))); + VerifyOrReturn(CheckValueAsString("labelList[1].value", iter_0.GetValue().value, chip::CharSpan("east", 4))); + VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 2)); + } + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("labelList", iter_0, 0)); + } + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH writes LabelList attribute of the DUT"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].label = chip::Span("roomgarbage: not in length on purpose", 4); + listHolder_0->mList[0].value = chip::Span("bedroom 1garbage: not in length on purpose", 9); + + listHolder_0->mList[1].label = chip::Span("Orientationgarbage: not in length on purpose", 11); + listHolder_0->mList[1].value = chip::Span("eastgarbage: not in length on purpose", 4); + + value = + chip::app::DataModel::List(listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads LabelList attribute of the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "TH writes LabelList attribute of the DUT"); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads LabelList attribute of the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_5Suite : public TestCommand +{ +public: + Test_TC_ULABEL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_2_5", 2, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ULABEL_2_5Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads LabelList attribute of the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::LabelList::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + class Test_TC_DGWIFI_2_1Suite : public TestCommand { public: @@ -36206,8 +36511,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 5)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 5U)); } break; case 4: @@ -36794,8 +37099,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; case 2: @@ -36804,8 +37109,8 @@ class Test_TC_WNCV_2_1Suite : public TestCommand chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 63)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } break; case 3: @@ -36814,8 +37119,8 @@ class Test_TC_WNCV_2_1Suite : public TestCommand chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 63)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 63U)); } break; case 4: @@ -36824,8 +37129,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } break; case 5: @@ -36834,8 +37139,8 @@ class Test_TC_WNCV_2_1Suite : public TestCommand chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 15)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); } break; case 6: @@ -37009,8 +37314,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; case 25: @@ -37019,8 +37324,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; default: @@ -37080,7 +37385,7 @@ class Test_TC_WNCV_2_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("A_MODE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; - value = static_cast>(0); + value = static_cast>(0U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -37354,8 +37659,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; case 3: @@ -37366,8 +37671,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; case 5: @@ -37378,8 +37683,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); configStatusValA = value; } break; @@ -37394,8 +37699,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; case 10: @@ -37403,8 +37708,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; case 11: @@ -37418,8 +37723,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); configStatusValB = value; } break; @@ -37434,8 +37739,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; case 17: @@ -37443,8 +37748,8 @@ class Test_TC_WNCV_2_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 127)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 127U)); } break; case 18: @@ -37477,7 +37782,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("WNCV_REVERSAL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; - value = static_cast>(1); + value = static_cast>(1U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -37492,7 +37797,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("WNCV_REVERSAL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; - value = static_cast>(0); + value = static_cast>(0U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -37507,7 +37812,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("WNCV_CALIBRATION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; - value = static_cast>(2); + value = static_cast>(2U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -37532,7 +37837,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("WNCV_CALIBRATION"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; - value = static_cast>(0); + value = static_cast>(0U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -37563,7 +37868,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("WNCV_MAINTENANCE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; - value = static_cast>(4); + value = static_cast>(4U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -37588,7 +37893,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("WNCV_MAINTENANCE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; - value = static_cast>(0); + value = static_cast>(0U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::Mode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -37665,8 +37970,8 @@ class Test_TC_WNCV_2_4Suite : public TestCommand chip::app::Clusters::WindowCovering::Type value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 9)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9U)); } break; default: @@ -37747,10 +38052,10 @@ class Test_TC_WNCV_2_5Suite : public TestCommand { chip::app::Clusters::WindowCovering::EndProductType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("endProductType", value, 0)); + VerifyOrReturn(CheckValue("endProductType", value, 0U)); VerifyOrReturn(CheckConstraintType("value", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } break; default: @@ -37849,8 +38154,8 @@ 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(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; case 5: @@ -37869,8 +38174,8 @@ 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(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; case 7: @@ -37916,8 +38221,8 @@ class Test_TC_WNCV_3_1Suite : public TestCommand chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 21)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 21U)); } shouldContinue = true; break; @@ -37941,8 +38246,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } break; case 17: @@ -37961,8 +38266,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } break; case 19: @@ -37977,7 +38282,7 @@ class Test_TC_WNCV_3_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 22: @@ -38254,8 +38559,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } break; case 5: @@ -38274,8 +38579,8 @@ 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(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 99)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 99U)); } break; case 7: @@ -38321,8 +38626,8 @@ class Test_TC_WNCV_3_2Suite : public TestCommand chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 10)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 42)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 10U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 42U)); } shouldContinue = true; break; @@ -38346,8 +38651,8 @@ 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(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; case 17: @@ -38366,8 +38671,8 @@ 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(CheckConstraintMinValue("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; case 19: @@ -38382,7 +38687,7 @@ class Test_TC_WNCV_3_2Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 22: @@ -38673,7 +38978,7 @@ class Test_TC_WNCV_3_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } shouldContinue = true; break; @@ -38686,7 +38991,7 @@ class Test_TC_WNCV_3_3Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 11: @@ -38931,7 +39236,7 @@ class Test_TC_WNCV_3_4Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 6: @@ -38949,7 +39254,7 @@ class Test_TC_WNCV_3_4Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 0U)); } break; case 8: @@ -38967,7 +39272,7 @@ class Test_TC_WNCV_3_4Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 0U)); } break; default: @@ -39123,7 +39428,7 @@ class Test_TC_WNCV_3_5Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 6: @@ -39141,7 +39446,7 @@ class Test_TC_WNCV_3_5Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 100)); + VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 100U)); } break; case 8: @@ -39159,7 +39464,7 @@ class Test_TC_WNCV_3_5Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 100)); + VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 100U)); } break; default: @@ -39334,7 +39639,7 @@ class Test_TC_WNCV_4_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 9: @@ -39352,7 +39657,7 @@ class Test_TC_WNCV_4_1Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 25)); + VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 25U)); } break; case 11: @@ -39380,7 +39685,7 @@ class Test_TC_WNCV_4_1Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 16: @@ -39398,7 +39703,7 @@ class Test_TC_WNCV_4_1Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 75)); + VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), 75U)); } break; default: @@ -39630,7 +39935,7 @@ class Test_TC_WNCV_4_2Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 9: @@ -39648,7 +39953,7 @@ class Test_TC_WNCV_4_2Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 30)); + VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 30U)); } break; case 11: @@ -39676,7 +39981,7 @@ class Test_TC_WNCV_4_2Suite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("operationalStatus", value, 0)); + VerifyOrReturn(CheckValue("operationalStatus", value, 0U)); } break; case 16: @@ -39694,7 +39999,7 @@ class Test_TC_WNCV_4_2Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); - VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 60)); + VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), 60U)); } break; default: @@ -39904,8 +40209,8 @@ class Test_TC_WNCV_4_3Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("currentPositionLiftPercentage", value)); VerifyOrReturn(CheckValue("currentPositionLiftPercentage.Value()", value.Value(), static_cast(attrCurrentPositionLiftPercent100ths.Value() / 100))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; case 3: @@ -40055,8 +40360,8 @@ class Test_TC_WNCV_4_4Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("currentPositionTiltPercentage", value)); VerifyOrReturn(CheckValue("currentPositionTiltPercentage.Value()", value.Value(), static_cast(attrCurrentPositionTiltPercent100ths.Value() / 100))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 100)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 100U)); } break; case 3: @@ -40328,7 +40633,7 @@ class Test_TC_WNCV_4_5Suite : public TestCommand LogStep(3, "1b: TH Waits for 100ms-1s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } case 4: { @@ -40362,7 +40667,7 @@ class Test_TC_WNCV_4_5Suite : public TestCommand LogStep(7, "2b: TH Waits for 100ms-1s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } case 8: { @@ -40472,11 +40777,11 @@ class TV_TargetNavigatorClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("targetList", iter_0, 0)); - VerifyOrReturn(CheckValue("targetList[0].identifier", iter_0.GetValue().identifier, 1)); + VerifyOrReturn(CheckValue("targetList[0].identifier", iter_0.GetValue().identifier, 1U)); VerifyOrReturn( CheckValueAsString("targetList[0].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); VerifyOrReturn(CheckNextListItemDecodes("targetList", iter_0, 1)); - VerifyOrReturn(CheckValue("targetList[1].identifier", iter_0.GetValue().identifier, 2)); + VerifyOrReturn(CheckValue("targetList[1].identifier", iter_0.GetValue().identifier, 2U)); VerifyOrReturn( CheckValueAsString("targetList[1].name", iter_0.GetValue().name, chip::CharSpan("exampleName", 11))); VerifyOrReturn(CheckNoMoreListItems("targetList", iter_0, 2)); @@ -40488,7 +40793,7 @@ class TV_TargetNavigatorClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentTarget", value, 0)); + VerifyOrReturn(CheckValue("currentTarget", value, 0U)); } break; case 3: @@ -40496,7 +40801,7 @@ class TV_TargetNavigatorClusterSuite : public TestCommand { chip::app::Clusters::TargetNavigator::Commands::NavigateTargetResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -40538,7 +40843,7 @@ class TV_TargetNavigatorClusterSuite : public TestCommand LogStep(3, "Navigate Target Request Command"); ListFreer listFreer; chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type value; - value.target = 1; + value.target = 1U; value.data.Emplace(); value.data.Value() = chip::Span("1garbage: not in length on purpose", 1); return SendCommand(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Commands::NavigateTarget::Id, @@ -40600,16 +40905,16 @@ class TV_AudioOutputClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 0)); - VerifyOrReturn(CheckValue("outputList[0].index", iter_0.GetValue().index, 1)); - VerifyOrReturn(CheckValue("outputList[0].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn(CheckValue("outputList[0].index", iter_0.GetValue().index, 1U)); + VerifyOrReturn(CheckValue("outputList[0].outputType", iter_0.GetValue().outputType, 0U)); VerifyOrReturn(CheckValueAsString("outputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 1)); - VerifyOrReturn(CheckValue("outputList[1].index", iter_0.GetValue().index, 2)); - VerifyOrReturn(CheckValue("outputList[1].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn(CheckValue("outputList[1].index", iter_0.GetValue().index, 2U)); + VerifyOrReturn(CheckValue("outputList[1].outputType", iter_0.GetValue().outputType, 0U)); VerifyOrReturn(CheckValueAsString("outputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 2)); - VerifyOrReturn(CheckValue("outputList[2].index", iter_0.GetValue().index, 3)); - VerifyOrReturn(CheckValue("outputList[2].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn(CheckValue("outputList[2].index", iter_0.GetValue().index, 3U)); + VerifyOrReturn(CheckValue("outputList[2].outputType", iter_0.GetValue().outputType, 0U)); VerifyOrReturn(CheckValueAsString("outputList[2].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckNoMoreListItems("outputList", iter_0, 3)); } @@ -40620,7 +40925,7 @@ class TV_AudioOutputClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentOutput", value, 1)); + VerifyOrReturn(CheckValue("currentOutput", value, 1U)); } break; case 3: @@ -40637,17 +40942,17 @@ class TV_AudioOutputClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 0)); - VerifyOrReturn(CheckValue("outputList[0].index", iter_0.GetValue().index, 1)); - VerifyOrReturn(CheckValue("outputList[0].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn(CheckValue("outputList[0].index", iter_0.GetValue().index, 1U)); + VerifyOrReturn(CheckValue("outputList[0].outputType", iter_0.GetValue().outputType, 0U)); VerifyOrReturn( CheckValueAsString("outputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI Test", 9))); VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 1)); - VerifyOrReturn(CheckValue("outputList[1].index", iter_0.GetValue().index, 2)); - VerifyOrReturn(CheckValue("outputList[1].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn(CheckValue("outputList[1].index", iter_0.GetValue().index, 2U)); + VerifyOrReturn(CheckValue("outputList[1].outputType", iter_0.GetValue().outputType, 0U)); VerifyOrReturn(CheckValueAsString("outputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckNextListItemDecodes("outputList", iter_0, 2)); - VerifyOrReturn(CheckValue("outputList[2].index", iter_0.GetValue().index, 3)); - VerifyOrReturn(CheckValue("outputList[2].outputType", iter_0.GetValue().outputType, 0)); + VerifyOrReturn(CheckValue("outputList[2].index", iter_0.GetValue().index, 3U)); + VerifyOrReturn(CheckValue("outputList[2].outputType", iter_0.GetValue().outputType, 0U)); VerifyOrReturn(CheckValueAsString("outputList[2].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckNoMoreListItems("outputList", iter_0, 3)); } @@ -40689,7 +40994,7 @@ class TV_AudioOutputClusterSuite : public TestCommand LogStep(3, "Select Output Command"); ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type value; - value.index = 1; + value.index = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::SelectOutput::Id, value, chip::NullOptional @@ -40699,7 +41004,7 @@ class TV_AudioOutputClusterSuite : public TestCommand LogStep(4, "Rename Output Command"); ListFreer listFreer; chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type value; - value.index = 1; + value.index = 1U; value.name = chip::Span("HDMI Testgarbage: not in length on purpose", 9); return SendCommand(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Commands::RenameOutput::Id, value, chip::NullOptional @@ -40786,7 +41091,7 @@ class TV_ApplicationLauncherClusterSuite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("data"), 4))); } @@ -40796,7 +41101,7 @@ class TV_ApplicationLauncherClusterSuite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("data"), 4))); } @@ -40806,7 +41111,7 @@ class TV_ApplicationLauncherClusterSuite : public TestCommand { chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueAsString("data", value.data, chip::ByteSpan(chip::Uint8::from_const_char("data"), 4))); } @@ -40935,7 +41240,7 @@ class TV_KeypadInputClusterSuite : public TestCommand { chip::app::Clusters::KeypadInput::Commands::SendKeyResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); } break; default: @@ -41246,7 +41551,7 @@ class TV_ApplicationBasicClusterSuite : public TestCommand { chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value, 0)); + VerifyOrReturn(CheckValue("status", value, 0U)); } break; case 6: @@ -41395,7 +41700,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0)); + VerifyOrReturn(CheckValue("currentState", value, 0U)); } break; case 2: @@ -41458,7 +41763,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41469,7 +41774,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41480,7 +41785,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41491,7 +41796,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41502,7 +41807,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41513,7 +41818,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41524,7 +41829,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41535,7 +41840,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41546,7 +41851,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41568,7 +41873,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41590,7 +41895,7 @@ class TV_MediaPlaybackClusterSuite : public TestCommand { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -41899,7 +42204,7 @@ class TV_ChannelClusterSuite : public TestCommand VerifyOrReturn(CheckValuePresent("lineup.Value().postalCode", value.Value().postalCode)); VerifyOrReturn(CheckValueAsString("lineup.Value().postalCode.Value()", value.Value().postalCode.Value(), chip::CharSpan("98052", 5))); - VerifyOrReturn(CheckValue("lineup.Value().lineupInfoType", value.Value().lineupInfoType, 0)); + VerifyOrReturn(CheckValue("lineup.Value().lineupInfoType", value.Value().lineupInfoType, 0U)); } break; case 3: @@ -41926,7 +42231,7 @@ class TV_ChannelClusterSuite : public TestCommand { chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("data response", 13))); @@ -42159,7 +42464,7 @@ class TV_ContentLauncherClusterSuite : public TestCommand { chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("exampleData", 11))); @@ -42170,7 +42475,7 @@ class TV_ContentLauncherClusterSuite : public TestCommand { chip::app::Clusters::ContentLauncher::Commands::LaunchResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("data", value.data)); VerifyOrReturn(CheckValueAsString("data.Value()", value.data.Value(), chip::CharSpan("exampleData", 11))); @@ -42391,14 +42696,14 @@ class TV_MediaInputClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 0)); - VerifyOrReturn(CheckValue("inputList[0].index", iter_0.GetValue().index, 1)); - VerifyOrReturn(CheckValue("inputList[0].inputType", iter_0.GetValue().inputType, 4)); + VerifyOrReturn(CheckValue("inputList[0].index", iter_0.GetValue().index, 1U)); + VerifyOrReturn(CheckValue("inputList[0].inputType", iter_0.GetValue().inputType, 4U)); VerifyOrReturn(CheckValueAsString("inputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckValueAsString("inputList[0].description", iter_0.GetValue().description, chip::CharSpan("High-Definition Multimedia Interface", 36))); VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 1)); - VerifyOrReturn(CheckValue("inputList[1].index", iter_0.GetValue().index, 2)); - VerifyOrReturn(CheckValue("inputList[1].inputType", iter_0.GetValue().inputType, 4)); + VerifyOrReturn(CheckValue("inputList[1].index", iter_0.GetValue().index, 2U)); + VerifyOrReturn(CheckValue("inputList[1].inputType", iter_0.GetValue().inputType, 4U)); VerifyOrReturn(CheckValueAsString("inputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckValueAsString("inputList[1].description", iter_0.GetValue().description, chip::CharSpan("High-Definition Multimedia Interface", 36))); @@ -42411,7 +42716,7 @@ class TV_MediaInputClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentInput", value, 1)); + VerifyOrReturn(CheckValue("currentInput", value, 1U)); } break; case 3: @@ -42434,14 +42739,14 @@ class TV_MediaInputClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 0)); - VerifyOrReturn(CheckValue("inputList[0].index", iter_0.GetValue().index, 1)); - VerifyOrReturn(CheckValue("inputList[0].inputType", iter_0.GetValue().inputType, 4)); + VerifyOrReturn(CheckValue("inputList[0].index", iter_0.GetValue().index, 1U)); + VerifyOrReturn(CheckValue("inputList[0].inputType", iter_0.GetValue().inputType, 4U)); VerifyOrReturn(CheckValueAsString("inputList[0].name", iter_0.GetValue().name, chip::CharSpan("HDMI Test", 9))); VerifyOrReturn(CheckValueAsString("inputList[0].description", iter_0.GetValue().description, chip::CharSpan("High-Definition Multimedia Interface", 36))); VerifyOrReturn(CheckNextListItemDecodes("inputList", iter_0, 1)); - VerifyOrReturn(CheckValue("inputList[1].index", iter_0.GetValue().index, 2)); - VerifyOrReturn(CheckValue("inputList[1].inputType", iter_0.GetValue().inputType, 4)); + VerifyOrReturn(CheckValue("inputList[1].index", iter_0.GetValue().index, 2U)); + VerifyOrReturn(CheckValue("inputList[1].inputType", iter_0.GetValue().inputType, 4U)); VerifyOrReturn(CheckValueAsString("inputList[1].name", iter_0.GetValue().name, chip::CharSpan("HDMI", 4))); VerifyOrReturn(CheckValueAsString("inputList[1].description", iter_0.GetValue().description, chip::CharSpan("High-Definition Multimedia Interface", 36))); @@ -42485,7 +42790,7 @@ class TV_MediaInputClusterSuite : public TestCommand LogStep(3, "Select Input Command"); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::SelectInput::Type value; - value.index = 1; + value.index = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::SelectInput::Id, value, chip::NullOptional @@ -42513,7 +42818,7 @@ class TV_MediaInputClusterSuite : public TestCommand LogStep(6, "Rename Input Command"); ListFreer listFreer; chip::app::Clusters::MediaInput::Commands::RenameInput::Type value; - value.index = 1; + value.index = 1U; value.name = chip::Span("HDMI Testgarbage: not in length on purpose", 9); return SendCommand(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Commands::RenameInput::Id, value, chip::NullOptional @@ -42601,7 +42906,7 @@ class TestClusterSuite : public TestCommand { chip::app::Clusters::TestCluster::Commands::TestSpecificResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 7)); + VerifyOrReturn(CheckValue("returnValue", value.returnValue, 7U)); } break; case 4: @@ -42609,7 +42914,7 @@ class TestClusterSuite : public TestCommand { chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20)); + VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U)); } break; case 5: @@ -42650,7 +42955,7 @@ class TestClusterSuite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 0)); + VerifyOrReturn(CheckValue("bitmap8", value, 0U)); } break; case 12: @@ -42661,7 +42966,7 @@ class TestClusterSuite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 255)); + VerifyOrReturn(CheckValue("bitmap8", value, 255U)); } break; case 14: @@ -42672,7 +42977,7 @@ class TestClusterSuite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 0)); + VerifyOrReturn(CheckValue("bitmap8", value, 0U)); } break; case 16: @@ -42770,7 +43075,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 0)); + VerifyOrReturn(CheckValue("int8u", value, 0U)); } break; case 32: @@ -42781,7 +43086,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 255)); + VerifyOrReturn(CheckValue("int8u", value, 255U)); } break; case 34: @@ -42792,7 +43097,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 0)); + VerifyOrReturn(CheckValue("int8u", value, 0U)); } break; case 36: @@ -43158,7 +43463,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 0)); + VerifyOrReturn(CheckValue("enum8", value, 0U)); } break; case 98: @@ -43169,7 +43474,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 255)); + VerifyOrReturn(CheckValue("enum8", value, 255U)); } break; case 100: @@ -43180,7 +43485,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 0)); + VerifyOrReturn(CheckValue("enum8", value, 0U)); } break; case 102: @@ -43612,7 +43917,7 @@ class TestClusterSuite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("arg1", value.arg1, 20003U)); - VerifyOrReturn(CheckValue("arg2", value.arg2, 101)); + VerifyOrReturn(CheckValue("arg2", value.arg2, 101U)); } break; case 155: @@ -43668,13 +43973,13 @@ class TestClusterSuite : public TestCommand { chip::app::Clusters::TestCluster::Commands::SimpleStructResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("arg1.a", value.arg1.a, 17)); + VerifyOrReturn(CheckValue("arg1.a", value.arg1.a, 17U)); VerifyOrReturn(CheckValue("arg1.b", value.arg1.b, false)); - VerifyOrReturn(CheckValue("arg1.c", value.arg1.c, 2)); + VerifyOrReturn(CheckValue("arg1.c", value.arg1.c, 2U)); VerifyOrReturn( CheckValueAsString("arg1.d", value.arg1.d, chip::ByteSpan(chip::Uint8::from_const_char("octet_string"), 12))); VerifyOrReturn(CheckValueAsString("arg1.e", value.arg1.e, chip::CharSpan("char_string", 11))); - VerifyOrReturn(CheckValue("arg1.f", value.arg1.f, 1)); + VerifyOrReturn(CheckValue("arg1.f", value.arg1.f, 1U)); VerifyOrReturn(CheckValue("arg1.g", value.arg1.g, 0.1f)); VerifyOrReturn(CheckValue("arg1.h", value.arg1.h, 0.1)); } @@ -43703,23 +44008,23 @@ class TestClusterSuite : public TestCommand { auto iter_0 = value.arg1.begin(); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 0)); - VerifyOrReturn(CheckValue("arg1[0]", iter_0.GetValue(), 9)); + VerifyOrReturn(CheckValue("arg1[0]", iter_0.GetValue(), 9U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 1)); - VerifyOrReturn(CheckValue("arg1[1]", iter_0.GetValue(), 8)); + VerifyOrReturn(CheckValue("arg1[1]", iter_0.GetValue(), 8U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 2)); - VerifyOrReturn(CheckValue("arg1[2]", iter_0.GetValue(), 7)); + VerifyOrReturn(CheckValue("arg1[2]", iter_0.GetValue(), 7U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 3)); - VerifyOrReturn(CheckValue("arg1[3]", iter_0.GetValue(), 6)); + VerifyOrReturn(CheckValue("arg1[3]", iter_0.GetValue(), 6U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 4)); - VerifyOrReturn(CheckValue("arg1[4]", iter_0.GetValue(), 5)); + VerifyOrReturn(CheckValue("arg1[4]", iter_0.GetValue(), 5U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 5)); - VerifyOrReturn(CheckValue("arg1[5]", iter_0.GetValue(), 4)); + VerifyOrReturn(CheckValue("arg1[5]", iter_0.GetValue(), 4U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 6)); - VerifyOrReturn(CheckValue("arg1[6]", iter_0.GetValue(), 3)); + VerifyOrReturn(CheckValue("arg1[6]", iter_0.GetValue(), 3U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 7)); - VerifyOrReturn(CheckValue("arg1[7]", iter_0.GetValue(), 2)); + VerifyOrReturn(CheckValue("arg1[7]", iter_0.GetValue(), 2U)); VerifyOrReturn(CheckNextListItemDecodes("arg1", iter_0, 8)); - VerifyOrReturn(CheckValue("arg1[8]", iter_0.GetValue(), 1)); + VerifyOrReturn(CheckValue("arg1[8]", iter_0.GetValue(), 1U)); VerifyOrReturn(CheckNoMoreListItems("arg1", iter_0, 9)); } } @@ -43778,13 +44083,13 @@ class TestClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4U)); VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); } } @@ -43857,11 +44162,11 @@ class TestClusterSuite : public TestCommand VerifyOrReturn(CheckValue("wasNull.Value()", value.wasNull.Value(), false)); VerifyOrReturn(CheckValuePresent("value", value.value)); - VerifyOrReturn(CheckValue("value.Value()", value.value.Value(), 5)); + VerifyOrReturn(CheckValue("value.Value()", value.value.Value(), 5U)); VerifyOrReturn(CheckValuePresent("originalValue", value.originalValue)); VerifyOrReturn(CheckValueNonNull("originalValue.Value()", value.originalValue.Value())); - VerifyOrReturn(CheckValue("originalValue.Value().Value()", value.originalValue.Value().Value(), 5)); + VerifyOrReturn(CheckValue("originalValue.Value().Value()", value.originalValue.Value().Value(), 5U)); } break; case 177: @@ -43918,11 +44223,11 @@ class TestClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes( "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_3, 0)); VerifyOrReturn( - CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[0]", iter_3.GetValue(), 1)); + CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[0]", iter_3.GetValue(), 1U)); VerifyOrReturn(CheckNextListItemDecodes( "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_3, 1)); VerifyOrReturn( - CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[1]", iter_3.GetValue(), 2)); + CheckValue("listNullablesAndOptionalsStruct[0].nullableList.Value()[1]", iter_3.GetValue(), 2U)); VerifyOrReturn(CheckNoMoreListItems( "listNullablesAndOptionalsStruct[0].nullableList.Value()", iter_3, 2)); } @@ -43972,7 +44277,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254U)); } break; case 188: @@ -43984,7 +44289,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableBitmap8", value)); - VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableBitmap8.Value()", value.Value(), 254U)); nullableValue254 = value; } @@ -44122,7 +44427,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableInt8u", value)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 0U)); } break; case 213: @@ -44134,7 +44439,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableInt8u", value)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 254U)); } break; case 215: @@ -44146,7 +44451,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableInt8u", value)); - VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableInt8u.Value()", value.Value(), 254U)); } break; case 217: @@ -44173,8 +44478,8 @@ class TestClusterSuite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 221: @@ -44182,7 +44487,7 @@ class TestClusterSuite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 254)); + VerifyOrReturn(CheckConstraintNotValue("value", value, 254U)); } break; case 222: @@ -44193,8 +44498,8 @@ class TestClusterSuite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 224: @@ -44202,7 +44507,7 @@ class TestClusterSuite : public TestCommand { chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintNotValue("value", value, 129)); + VerifyOrReturn(CheckConstraintNotValue("value", value, 129U)); } break; case 225: @@ -44872,7 +45177,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableEnum8", value)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 0U)); } break; case 330: @@ -44884,7 +45189,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableEnum8", value)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 254U)); } break; case 332: @@ -44896,7 +45201,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableEnum8", value)); - VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableEnum8.Value()", value.Value(), 254U)); } break; case 334: @@ -44966,7 +45271,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 0U)); } break; case 346: @@ -44978,7 +45283,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 254U)); } break; case 348: @@ -44990,7 +45295,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableEnumAttr", value)); - VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 254)); + VerifyOrReturn(CheckValue("nullableEnumAttr.Value()", value.Value(), 254U)); nullableEnumAttr254 = value; } @@ -45187,13 +45492,13 @@ class TestClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 1U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 2U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 3U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 4U)); VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); } } @@ -45209,13 +45514,13 @@ class TestClusterSuite : public TestCommand { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 0)); - VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 5)); + VerifyOrReturn(CheckValue("listInt8u[0]", iter_0.GetValue(), 5U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 1)); - VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 6)); + VerifyOrReturn(CheckValue("listInt8u[1]", iter_0.GetValue(), 6U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 2)); - VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 7)); + VerifyOrReturn(CheckValue("listInt8u[2]", iter_0.GetValue(), 7U)); VerifyOrReturn(CheckNextListItemDecodes("listInt8u", iter_0, 3)); - VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 8)); + VerifyOrReturn(CheckValue("listInt8u[3]", iter_0.GetValue(), 8U)); VerifyOrReturn(CheckNoMoreListItems("listInt8u", iter_0, 4)); } } @@ -45226,7 +45531,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 70)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 70U)); } break; case 378: @@ -45246,7 +45551,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 70)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 70U)); } break; case 383: @@ -45257,7 +45562,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 20)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 20U)); } break; case 385: @@ -45268,7 +45573,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 100)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 100U)); } break; case 387: @@ -45279,7 +45584,7 @@ class TestClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 50)); + VerifyOrReturn(CheckValue("rangeRestrictedInt8u", value, 50U)); } break; case 389: @@ -45471,7 +45776,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 70)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 70U)); } break; case 426: @@ -45492,7 +45797,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 70)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 70U)); } break; case 431: @@ -45504,7 +45809,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 20)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 20U)); } break; case 433: @@ -45516,7 +45821,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 100)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 100U)); } break; case 435: @@ -45528,7 +45833,7 @@ class TestClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("nullableRangeRestrictedInt8u", value)); - VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 50)); + VerifyOrReturn(CheckValue("nullableRangeRestrictedInt8u.Value()", value.Value(), 50U)); } break; case 437: @@ -45869,12 +46174,12 @@ class TestClusterSuite : public TestCommand { chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("structAttr.a", value.a, 5)); + VerifyOrReturn(CheckValue("structAttr.a", value.a, 5U)); VerifyOrReturn(CheckValue("structAttr.b", value.b, true)); - VerifyOrReturn(CheckValue("structAttr.c", value.c, 2)); + VerifyOrReturn(CheckValue("structAttr.c", value.c, 2U)); VerifyOrReturn(CheckValueAsString("structAttr.d", value.d, chip::ByteSpan(chip::Uint8::from_const_char("abc"), 3))); VerifyOrReturn(CheckValueAsString("structAttr.e", value.e, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("structAttr.f", value.f, 17)); + VerifyOrReturn(CheckValue("structAttr.f", value.f, 17U)); VerifyOrReturn(CheckValue("structAttr.g", value.g, 1.5f)); VerifyOrReturn(CheckValue("structAttr.h", value.h, 3.14159265358979)); } @@ -45932,8 +46237,8 @@ class TestClusterSuite : public TestCommand LogStep(4, "Send Test Add Arguments Command"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value; - value.arg1 = 3; - value.arg2 = 17; + value.arg1 = 3U; + value.arg2 = 17U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value, chip::NullOptional @@ -45943,8 +46248,8 @@ class TestClusterSuite : public TestCommand LogStep(5, "Send failing Test Add Arguments Command"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value; - value.arg1 = 250; - value.arg2 = 6; + value.arg1 = 250U; + value.arg2 = 6U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value, chip::NullOptional @@ -45990,7 +46295,7 @@ class TestClusterSuite : public TestCommand LogStep(12, "Write attribute BITMAP8 Max Value"); ListFreer listFreer; chip::BitMask value; - value = static_cast>(255); + value = static_cast>(255U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46003,7 +46308,7 @@ class TestClusterSuite : public TestCommand LogStep(14, "Write attribute BITMAP8 Min Value"); ListFreer listFreer; chip::BitMask value; - value = static_cast>(0); + value = static_cast>(0U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46114,7 +46419,7 @@ class TestClusterSuite : public TestCommand LogStep(32, "Write attribute INT8U Max Value"); ListFreer listFreer; uint8_t value; - value = 255; + value = 255U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46127,7 +46432,7 @@ class TestClusterSuite : public TestCommand LogStep(34, "Write attribute INT8U Min Value"); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46528,7 +46833,7 @@ class TestClusterSuite : public TestCommand LogStep(98, "Write attribute ENUM8 Max Value"); ListFreer listFreer; uint8_t value; - value = 255; + value = 255U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46541,7 +46846,7 @@ class TestClusterSuite : public TestCommand LogStep(100, "Write attribute ENUM8 Min Value"); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -46962,12 +47267,12 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type value; - value.arg1.a = 0; + value.arg1.a = 0U; value.arg1.b = true; value.arg1.c = static_cast(2); value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1); + value.arg1.f = static_cast>(1U); value.arg1.g = 0.0f; value.arg1.h = 0; @@ -46981,12 +47286,12 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type value; - value.arg1.a = 0; + value.arg1.a = 0U; value.arg1.b = false; value.arg1.c = static_cast(2); value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1); + value.arg1.f = static_cast>(1U); value.arg1.g = 0.0f; value.arg1.h = 0; @@ -47000,15 +47305,15 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type value; - value.arg1.a = 0; + value.arg1.a = 0U; value.arg1.b = true; - value.arg1.c.a = 0; + value.arg1.c.a = 0U; value.arg1.c.b = true; value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1U); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -47022,15 +47327,15 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructArgumentRequest::Type value; - value.arg1.a = 0; + value.arg1.a = 0U; value.arg1.b = true; - value.arg1.c.a = 0; + value.arg1.c.a = 0U; value.arg1.c.b = false; value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1U); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -47044,15 +47349,15 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type value; - value.arg1.a = 0; + value.arg1.a = 0U; value.arg1.b = true; - value.arg1.c.a = 0; + value.arg1.c.a = 0U; value.arg1.c.b = true; value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1U); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -47060,23 +47365,23 @@ class TestClusterSuite : public TestCommand auto * listHolder_1 = new ListHolder(2); listFreer.add(listHolder_1); - listHolder_1->mList[0].a = 1; + listHolder_1->mList[0].a = 1U; listHolder_1->mList[0].b = true; listHolder_1->mList[0].c = static_cast(3); listHolder_1->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[0].f = static_cast>(1); + listHolder_1->mList[0].f = static_cast>(1U); listHolder_1->mList[0].g = 0.0f; listHolder_1->mList[0].h = 0; - listHolder_1->mList[1].a = 2; + listHolder_1->mList[1].a = 2U; listHolder_1->mList[1].b = true; listHolder_1->mList[1].c = static_cast(3); listHolder_1->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[1].f = static_cast>(1); + listHolder_1->mList[1].f = static_cast>(1U); listHolder_1->mList[1].g = 0.0f; listHolder_1->mList[1].h = 0; @@ -47108,8 +47413,8 @@ class TestClusterSuite : public TestCommand { auto * listHolder_1 = new ListHolder(2); listFreer.add(listHolder_1); - listHolder_1->mList[0] = 0; - listHolder_1->mList[1] = 255; + listHolder_1->mList[0] = 0U; + listHolder_1->mList[1] = 255U; value.arg1.g = chip::app::DataModel::List(listHolder_1->mList, 2); } @@ -47123,15 +47428,15 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestNestedStructListArgumentRequest::Type value; - value.arg1.a = 0; + value.arg1.a = 0U; value.arg1.b = true; - value.arg1.c.a = 0; + value.arg1.c.a = 0U; value.arg1.c.b = true; value.arg1.c.c = static_cast(2); value.arg1.c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.c.f = static_cast>(1); + value.arg1.c.f = static_cast>(1U); value.arg1.c.g = 0.0f; value.arg1.c.h = 0; @@ -47139,23 +47444,23 @@ class TestClusterSuite : public TestCommand auto * listHolder_1 = new ListHolder(2); listFreer.add(listHolder_1); - listHolder_1->mList[0].a = 1; + listHolder_1->mList[0].a = 1U; listHolder_1->mList[0].b = true; listHolder_1->mList[0].c = static_cast(3); listHolder_1->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[0].f = static_cast>(1); + listHolder_1->mList[0].f = static_cast>(1U); listHolder_1->mList[0].g = 0.0f; listHolder_1->mList[0].h = 0; - listHolder_1->mList[1].a = 2; + listHolder_1->mList[1].a = 2U; listHolder_1->mList[1].b = false; listHolder_1->mList[1].c = static_cast(3); listHolder_1->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_1->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_1->mList[1].f = static_cast>(1); + listHolder_1->mList[1].f = static_cast>(1U); listHolder_1->mList[1].g = 0.0f; listHolder_1->mList[1].h = 0; @@ -47187,8 +47492,8 @@ class TestClusterSuite : public TestCommand { auto * listHolder_1 = new ListHolder(2); listFreer.add(listHolder_1); - listHolder_1->mList[0] = 0; - listHolder_1->mList[1] = 255; + listHolder_1->mList[0] = 0U; + listHolder_1->mList[1] = 255U; value.arg1.g = chip::app::DataModel::List(listHolder_1->mList, 2); } @@ -47202,12 +47507,12 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::SimpleStructEchoRequest::Type value; - value.arg1.a = 17; + value.arg1.a = 17U; value.arg1.b = false; value.arg1.c = static_cast(2); value.arg1.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); value.arg1.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - value.arg1.f = static_cast>(1); + value.arg1.f = static_cast>(1U); value.arg1.g = 0.1f; value.arg1.h = 0.1; @@ -47224,15 +47529,15 @@ class TestClusterSuite : public TestCommand { auto * listHolder_0 = new ListHolder(9); listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1; - listHolder_0->mList[1] = 2; - listHolder_0->mList[2] = 3; - listHolder_0->mList[3] = 4; - listHolder_0->mList[4] = 5; - listHolder_0->mList[5] = 6; - listHolder_0->mList[6] = 7; - listHolder_0->mList[7] = 8; - listHolder_0->mList[8] = 9; + listHolder_0->mList[0] = 1U; + listHolder_0->mList[1] = 2U; + listHolder_0->mList[2] = 3U; + listHolder_0->mList[3] = 4U; + listHolder_0->mList[4] = 5U; + listHolder_0->mList[5] = 6U; + listHolder_0->mList[6] = 7U; + listHolder_0->mList[7] = 8U; + listHolder_0->mList[8] = 9U; value.arg1 = chip::app::DataModel::List(listHolder_0->mList, 9); } return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, @@ -47248,16 +47553,16 @@ class TestClusterSuite : public TestCommand { auto * listHolder_0 = new ListHolder(10); listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1; - listHolder_0->mList[1] = 2; - listHolder_0->mList[2] = 3; - listHolder_0->mList[3] = 4; - listHolder_0->mList[4] = 5; - listHolder_0->mList[5] = 6; - listHolder_0->mList[6] = 7; - listHolder_0->mList[7] = 8; - listHolder_0->mList[8] = 9; - listHolder_0->mList[9] = 0; + listHolder_0->mList[0] = 1U; + listHolder_0->mList[1] = 2U; + listHolder_0->mList[2] = 3U; + listHolder_0->mList[3] = 4U; + listHolder_0->mList[4] = 5U; + listHolder_0->mList[5] = 6U; + listHolder_0->mList[6] = 7U; + listHolder_0->mList[7] = 8U; + listHolder_0->mList[8] = 9U; + listHolder_0->mList[9] = 0U; value.arg1 = chip::app::DataModel::List(listHolder_0->mList, 10); } return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, @@ -47273,15 +47578,15 @@ class TestClusterSuite : public TestCommand { auto * listHolder_0 = new ListHolder(9); listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1; - listHolder_0->mList[1] = 2; - listHolder_0->mList[2] = 3; - listHolder_0->mList[3] = 4; - listHolder_0->mList[4] = 5; - listHolder_0->mList[5] = 6; - listHolder_0->mList[6] = 7; - listHolder_0->mList[7] = 8; - listHolder_0->mList[8] = 9; + listHolder_0->mList[0] = 1U; + listHolder_0->mList[1] = 2U; + listHolder_0->mList[2] = 3U; + listHolder_0->mList[3] = 4U; + listHolder_0->mList[4] = 5U; + listHolder_0->mList[5] = 6U; + listHolder_0->mList[6] = 7U; + listHolder_0->mList[7] = 8U; + listHolder_0->mList[8] = 9U; value.arg1 = chip::app::DataModel::List(listHolder_0->mList, 9); } return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, @@ -47309,23 +47614,23 @@ class TestClusterSuite : public TestCommand auto * listHolder_0 = new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].a = 0; + listHolder_0->mList[0].a = 0U; listHolder_0->mList[0].b = true; listHolder_0->mList[0].c = static_cast(2); listHolder_0->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); listHolder_0->mList[0].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - listHolder_0->mList[0].f = static_cast>(1); + listHolder_0->mList[0].f = static_cast>(1U); listHolder_0->mList[0].g = 0.0f; listHolder_0->mList[0].h = 0; - listHolder_0->mList[1].a = 1; + listHolder_0->mList[1].a = 1U; listHolder_0->mList[1].b = true; listHolder_0->mList[1].c = static_cast(3); listHolder_0->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); listHolder_0->mList[1].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - listHolder_0->mList[1].f = static_cast>(1); + listHolder_0->mList[1].f = static_cast>(1U); listHolder_0->mList[1].g = 0.0f; listHolder_0->mList[1].h = 0; @@ -47346,23 +47651,23 @@ class TestClusterSuite : public TestCommand auto * listHolder_0 = new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].a = 1; + listHolder_0->mList[0].a = 1U; listHolder_0->mList[0].b = true; listHolder_0->mList[0].c = static_cast(3); listHolder_0->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("second_octet_stringgarbage: not in length on purpose"), 19); listHolder_0->mList[0].e = chip::Span("second_char_stringgarbage: not in length on purpose", 18); - listHolder_0->mList[0].f = static_cast>(1); + listHolder_0->mList[0].f = static_cast>(1U); listHolder_0->mList[0].g = 0.0f; listHolder_0->mList[0].h = 0; - listHolder_0->mList[1].a = 0; + listHolder_0->mList[1].a = 0U; listHolder_0->mList[1].b = false; listHolder_0->mList[1].c = static_cast(2); listHolder_0->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("first_octet_stringgarbage: not in length on purpose"), 18); listHolder_0->mList[1].e = chip::Span("first_char_stringgarbage: not in length on purpose", 17); - listHolder_0->mList[1].f = static_cast>(1); + listHolder_0->mList[1].f = static_cast>(1U); listHolder_0->mList[1].g = 0.0f; listHolder_0->mList[1].h = 0; @@ -47384,16 +47689,16 @@ class TestClusterSuite : public TestCommand auto * listHolder_0 = new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].a = 0; + listHolder_0->mList[0].a = 0U; listHolder_0->mList[0].b = true; - listHolder_0->mList[0].c.a = 0; + listHolder_0->mList[0].c.a = 0U; listHolder_0->mList[0].c.b = true; listHolder_0->mList[0].c.c = static_cast(2); listHolder_0->mList[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); listHolder_0->mList[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - listHolder_0->mList[0].c.f = static_cast>(1); + listHolder_0->mList[0].c.f = static_cast>(1U); listHolder_0->mList[0].c.g = 0.0f; listHolder_0->mList[0].c.h = 0; @@ -47401,23 +47706,23 @@ class TestClusterSuite : public TestCommand auto * listHolder_2 = new ListHolder(2); listFreer.add(listHolder_2); - listHolder_2->mList[0].a = 1; + listHolder_2->mList[0].a = 1U; listHolder_2->mList[0].b = true; listHolder_2->mList[0].c = static_cast(3); listHolder_2->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[0].f = static_cast>(1); + listHolder_2->mList[0].f = static_cast>(1U); listHolder_2->mList[0].g = 0.0f; listHolder_2->mList[0].h = 0; - listHolder_2->mList[1].a = 2; + listHolder_2->mList[1].a = 2U; listHolder_2->mList[1].b = true; listHolder_2->mList[1].c = static_cast(3); listHolder_2->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[1].f = static_cast>(1); + listHolder_2->mList[1].f = static_cast>(1U); listHolder_2->mList[1].g = 0.0f; listHolder_2->mList[1].h = 0; @@ -47450,8 +47755,8 @@ class TestClusterSuite : public TestCommand { auto * listHolder_2 = new ListHolder(2); listFreer.add(listHolder_2); - listHolder_2->mList[0] = 0; - listHolder_2->mList[1] = 255; + listHolder_2->mList[0] = 0U; + listHolder_2->mList[1] = 255U; listHolder_0->mList[0].g = chip::app::DataModel::List(listHolder_2->mList, 2); } @@ -47472,16 +47777,16 @@ class TestClusterSuite : public TestCommand auto * listHolder_0 = new ListHolder(1); listFreer.add(listHolder_0); - listHolder_0->mList[0].a = 0; + listHolder_0->mList[0].a = 0U; listHolder_0->mList[0].b = true; - listHolder_0->mList[0].c.a = 0; + listHolder_0->mList[0].c.a = 0U; listHolder_0->mList[0].c.b = true; listHolder_0->mList[0].c.c = static_cast(2); listHolder_0->mList[0].c.d = chip::ByteSpan(chip::Uint8::from_const_char("octet_stringgarbage: not in length on purpose"), 12); listHolder_0->mList[0].c.e = chip::Span("char_stringgarbage: not in length on purpose", 11); - listHolder_0->mList[0].c.f = static_cast>(1); + listHolder_0->mList[0].c.f = static_cast>(1U); listHolder_0->mList[0].c.g = 0.0f; listHolder_0->mList[0].c.h = 0; @@ -47489,23 +47794,23 @@ class TestClusterSuite : public TestCommand auto * listHolder_2 = new ListHolder(2); listFreer.add(listHolder_2); - listHolder_2->mList[0].a = 1; + listHolder_2->mList[0].a = 1U; listHolder_2->mList[0].b = true; listHolder_2->mList[0].c = static_cast(3); listHolder_2->mList[0].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[0].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[0].f = static_cast>(1); + listHolder_2->mList[0].f = static_cast>(1U); listHolder_2->mList[0].g = 0.0f; listHolder_2->mList[0].h = 0; - listHolder_2->mList[1].a = 2; + listHolder_2->mList[1].a = 2U; listHolder_2->mList[1].b = false; listHolder_2->mList[1].c = static_cast(3); listHolder_2->mList[1].d = chip::ByteSpan(chip::Uint8::from_const_char("nested_octet_stringgarbage: not in length on purpose"), 19); listHolder_2->mList[1].e = chip::Span("nested_char_stringgarbage: not in length on purpose", 18); - listHolder_2->mList[1].f = static_cast>(1); + listHolder_2->mList[1].f = static_cast>(1U); listHolder_2->mList[1].g = 0.0f; listHolder_2->mList[1].h = 0; @@ -47538,8 +47843,8 @@ class TestClusterSuite : public TestCommand { auto * listHolder_2 = new ListHolder(2); listFreer.add(listHolder_2); - listHolder_2->mList[0] = 0; - listHolder_2->mList[1] = 255; + listHolder_2->mList[0] = 0U; + listHolder_2->mList[1] = 255U; listHolder_0->mList[0].g = chip::app::DataModel::List(listHolder_2->mList, 2); } @@ -47559,10 +47864,10 @@ class TestClusterSuite : public TestCommand { auto * listHolder_0 = new ListHolder(4); listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1; - listHolder_0->mList[1] = 2; - listHolder_0->mList[2] = 3; - listHolder_0->mList[3] = 4; + listHolder_0->mList[0] = 1U; + listHolder_0->mList[1] = 2U; + listHolder_0->mList[2] = 3U; + listHolder_0->mList[3] = 4U; value = chip::app::DataModel::List(listHolder_0->mList, 4); } return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value, @@ -47638,7 +47943,7 @@ class TestClusterSuite : public TestCommand chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type value; value.arg1.Emplace(); value.arg1.Value().SetNonNull(); - value.arg1.Value().Value() = 5; + value.arg1.Value().Value() = 5U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestNullableOptionalRequest::Id, value, chip::NullOptional @@ -47731,7 +48036,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(254); + value.Value() = static_cast>(254U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -47745,7 +48050,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable> value; value.SetNonNull(); - value.Value() = static_cast>(255); + value.Value() = static_cast>(255U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableBitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -47900,7 +48205,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 0; + value.Value() = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -47914,7 +48219,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 254; + value.Value() = 254U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -47928,7 +48233,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 255; + value.Value() = 255U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -47970,7 +48275,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 128; + value.Value() = 128U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -48659,7 +48964,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 0; + value.Value() = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -48673,7 +48978,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 254; + value.Value() = 254U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -48687,7 +48992,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 255; + value.Value() = 255U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableEnum8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -48974,10 +49279,10 @@ class TestClusterSuite : public TestCommand { auto * listHolder_0 = new ListHolder(4); listFreer.add(listHolder_0); - listHolder_0->mList[0] = 5; - listHolder_0->mList[1] = 6; - listHolder_0->mList[2] = 7; - listHolder_0->mList[3] = 8; + listHolder_0->mList[0] = 5U; + listHolder_0->mList[1] = 6U; + listHolder_0->mList[2] = 7U; + listHolder_0->mList[3] = 8U; value = chip::app::DataModel::List(listHolder_0->mList, 4); } return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value, @@ -48996,7 +49301,7 @@ class TestClusterSuite : public TestCommand LogStep(378, "Write min value to a range-restricted unsigned 8-bit integer"); ListFreer listFreer; uint8_t value; - value = 0; + value = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -49004,7 +49309,7 @@ class TestClusterSuite : public TestCommand LogStep(379, "Write just-below-range value to a range-restricted unsigned 8-bit integer"); ListFreer listFreer; uint8_t value; - value = 19; + value = 19U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -49012,7 +49317,7 @@ class TestClusterSuite : public TestCommand LogStep(380, "Write just-above-range value to a range-restricted unsigned 8-bit integer"); ListFreer listFreer; uint8_t value; - value = 101; + value = 101U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -49020,7 +49325,7 @@ class TestClusterSuite : public TestCommand LogStep(381, "Write max value to a range-restricted unsigned 8-bit integer"); ListFreer listFreer; uint8_t value; - value = 255; + value = 255U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -49033,7 +49338,7 @@ class TestClusterSuite : public TestCommand LogStep(383, "Write min valid value to a range-restricted unsigned 8-bit integer"); ListFreer listFreer; uint8_t value; - value = 20; + value = 20U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -49046,7 +49351,7 @@ class TestClusterSuite : public TestCommand LogStep(385, "Write max valid value to a range-restricted unsigned 8-bit integer"); ListFreer listFreer; uint8_t value; - value = 100; + value = 100U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -49059,7 +49364,7 @@ class TestClusterSuite : public TestCommand LogStep(387, "Write middle valid value to a range-restricted unsigned 8-bit integer"); ListFreer listFreer; uint8_t value; - value = 50; + value = 50U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::RangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -49335,7 +49640,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 0; + value.Value() = 0U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); @@ -49345,7 +49650,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 19; + value.Value() = 19U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); @@ -49355,7 +49660,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 101; + value.Value() = 101U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); @@ -49365,7 +49670,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 254; + value.Value() = 254U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); @@ -49380,7 +49685,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 20; + value.Value() = 20U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); @@ -49395,7 +49700,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 100; + value.Value() = 100U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); @@ -49410,7 +49715,7 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 50; + value.Value() = 50U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, value, chip::NullOptional, chip::NullOptional); @@ -49802,12 +50107,12 @@ class TestClusterSuite : public TestCommand ListFreer listFreer; chip::app::Clusters::TestCluster::Structs::SimpleStruct::Type value; - value.a = 5; + value.a = 5U; value.b = true; value.c = static_cast(2); value.d = chip::ByteSpan(chip::Uint8::from_const_char("abcgarbage: not in length on purpose"), 3); value.e = chip::Span("garbage: not in length on purpose", 0); - value.f = static_cast>(17); + value.f = static_cast>(17U); value.g = 1.5f; value.h = 3.14159265358979; @@ -50208,9 +50513,9 @@ class TestConstraintsSuite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintContains("value", value, 2)); - VerifyOrReturn(CheckConstraintContains("value", value, 3)); - VerifyOrReturn(CheckConstraintContains("value", value, 4)); + VerifyOrReturn(CheckConstraintContains("value", value, 2U)); + VerifyOrReturn(CheckConstraintContains("value", value, 3U)); + VerifyOrReturn(CheckConstraintContains("value", value, 4U)); } break; case 3: @@ -50218,8 +50523,8 @@ class TestConstraintsSuite : public TestCommand { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintExcludes("value", value, 0)); - VerifyOrReturn(CheckConstraintExcludes("value", value, 5)); + VerifyOrReturn(CheckConstraintExcludes("value", value, 0U)); + VerifyOrReturn(CheckConstraintExcludes("value", value, 5U)); } break; case 4: @@ -50381,10 +50686,10 @@ class TestConstraintsSuite : public TestCommand { auto * listHolder_0 = new ListHolder(4); listFreer.add(listHolder_0); - listHolder_0->mList[0] = 1; - listHolder_0->mList[1] = 2; - listHolder_0->mList[2] = 3; - listHolder_0->mList[3] = 4; + listHolder_0->mList[0] = 1U; + listHolder_0->mList[1] = 2U; + listHolder_0->mList[2] = 3U; + listHolder_0->mList[3] = 4U; value = chip::app::DataModel::List(listHolder_0->mList, 4); } return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::ListInt8u::Id, value, @@ -50699,8 +51004,8 @@ class TestEventsSuite : public TestCommand { chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2)); + VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); + VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); } mTestSubStepIndex++; @@ -50718,8 +51023,8 @@ class TestEventsSuite : public TestCommand { chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2)); + VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); + VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); } mTestSubStepIndex++; @@ -50753,8 +51058,8 @@ class TestEventsSuite : public TestCommand { chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2)); + VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); + VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); } mTestSubStepIndex++; @@ -50764,8 +51069,8 @@ class TestEventsSuite : public TestCommand { chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 4)); + VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3U)); + VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 4U)); VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, false)); } mTestSubStepIndex++; @@ -50783,8 +51088,8 @@ class TestEventsSuite : public TestCommand { chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2)); + VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 1U)); + VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 2U)); VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); } mTestSubStepIndex++; @@ -50794,8 +51099,8 @@ class TestEventsSuite : public TestCommand { chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 4)); + VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 3U)); + VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 4U)); VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, false)); } mTestSubStepIndex++; @@ -50821,8 +51126,8 @@ class TestEventsSuite : public TestCommand { chip::app::Clusters::TestCluster::Events::TestEvent::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 4)); - VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 5)); + VerifyOrReturn(CheckValue("testEvent.arg1", value.arg1, 4U)); + VerifyOrReturn(CheckValue("testEvent.arg2", value.arg2, 5U)); VerifyOrReturn(CheckValue("testEvent.arg3", value.arg3, true)); } shouldContinue = true; @@ -50871,7 +51176,7 @@ class TestEventsSuite : public TestCommand LogStep(3, "Generate an event on the accessory"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type value; - value.arg1 = 1; + value.arg1 = 1U; value.arg2 = static_cast(2); value.arg3 = true; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEmitTestEventRequest::Id, @@ -50901,7 +51206,7 @@ class TestEventsSuite : public TestCommand LogStep(7, "Generate a second event on the accessory"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type value; - value.arg1 = 3; + value.arg1 = 3U; value.arg2 = static_cast(4); value.arg3 = false; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEmitTestEventRequest::Id, @@ -50925,7 +51230,7 @@ class TestEventsSuite : public TestCommand LogStep(10, "Generate a third event on the accessory"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestEmitTestEventRequest::Type value; - value.arg1 = 4; + value.arg1 = 4U; value.arg2 = static_cast(5); value.arg3 = true; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestEmitTestEventRequest::Id, @@ -51140,7 +51445,7 @@ class TestDiscoverySuite : public TestCommand chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 1)); + VerifyOrReturn(CheckValue("commissioningMode", value.commissioningMode, 1U)); } shouldContinue = true; break; @@ -51190,7 +51495,7 @@ class TestDiscoverySuite : public TestCommand chip::app::Clusters::DiscoveryCommands::Commands::DiscoveryCommandResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1)); + VerifyOrReturn(CheckConstraintMinValue("value.numIPs", value.numIPs, 1U)); } shouldContinue = true; break; @@ -51627,7 +51932,7 @@ class TestSaveAsSuite : public TestCommand { chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20)); + VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U)); TestAddArgumentDefaultValue = value.returnValue; } @@ -51685,7 +51990,7 @@ class TestSaveAsSuite : public TestCommand { chip::BitMask value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("bitmap8", value, 0)); + VerifyOrReturn(CheckValue("bitmap8", value, 0U)); readAttributeBitmap8DefaultValue = value; } @@ -51813,7 +52118,7 @@ class TestSaveAsSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("int8u", value, 0)); + VerifyOrReturn(CheckValue("int8u", value, 0U)); readAttributeInt8uDefaultValue = value; } @@ -52069,7 +52374,7 @@ class TestSaveAsSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enum8", value, 0)); + VerifyOrReturn(CheckValue("enum8", value, 0U)); readAttributeEnum8DefaultValue = value; } @@ -52387,8 +52692,8 @@ class TestSaveAsSuite : public TestCommand LogStep(1, "Send Test Add Arguments Command"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value; - value.arg1 = 3; - value.arg2 = 17; + value.arg1 = 3U; + value.arg2 = 17U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value, chip::NullOptional @@ -52398,8 +52703,8 @@ class TestSaveAsSuite : public TestCommand LogStep(2, "Send Test Add Arguments Command"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value; - value.arg1 = 3; - value.arg2 = 17; + value.arg1 = 3U; + value.arg2 = 17U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value, chip::NullOptional @@ -52409,7 +52714,7 @@ class TestSaveAsSuite : public TestCommand LogStep(3, "Send Test Add Arguments Command"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value; - value.arg1 = 3; + value.arg1 = 3U; value.arg2 = TestAddArgumentDefaultValue; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value, chip::NullOptional @@ -52456,7 +52761,7 @@ class TestSaveAsSuite : public TestCommand LogStep(10, "Write attribute BITMAP8 Not Default Value"); ListFreer listFreer; chip::BitMask value; - value = static_cast>(1); + value = static_cast>(1U); return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Bitmap8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -52580,7 +52885,7 @@ class TestSaveAsSuite : public TestCommand LogStep(30, "Write attribute INT8U Not Default Value"); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Int8u::Id, value, chip::NullOptional, chip::NullOptional); } @@ -52828,7 +53133,7 @@ class TestSaveAsSuite : public TestCommand LogStep(70, "Write attribute ENUM8 Not Default Value"); ListFreer listFreer; uint8_t value; - value = 1; + value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Attributes::Enum8::Id, value, chip::NullOptional, chip::NullOptional); } @@ -53129,7 +53434,7 @@ class TestConfigVariablesSuite : public TestCommand { chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20)); + VerifyOrReturn(CheckValue("returnValue", value.returnValue, 20U)); TestAddArgumentDefaultValue = value.returnValue; } @@ -53140,7 +53445,7 @@ class TestConfigVariablesSuite : public TestCommand chip::app::Clusters::TestCluster::Commands::TestAddArgumentsResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("returnValue", value.returnValue, - mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25)); + mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U)); } break; default: @@ -53169,8 +53474,8 @@ class TestConfigVariablesSuite : public TestCommand LogStep(1, "Send Test Add Arguments Command"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value; - value.arg1 = 3; - value.arg2 = 17; + value.arg1 = 3U; + value.arg2 = 17U; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value, chip::NullOptional @@ -53180,7 +53485,7 @@ class TestConfigVariablesSuite : public TestCommand LogStep(2, "Send Test Add Arguments Command"); ListFreer listFreer; chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type value; - value.arg1 = mArg1.HasValue() ? mArg1.Value() : 5; + value.arg1 = mArg1.HasValue() ? mArg1.Value() : 5U; value.arg2 = TestAddArgumentDefaultValue; return SendCommand(kIdentityAlpha, GetEndpoint(1), TestCluster::Id, TestCluster::Commands::TestAddArguments::Id, value, chip::NullOptional @@ -53809,7 +54114,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 3)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 3U)); } break; case 11: @@ -53828,7 +54133,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 4)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 4U)); } break; case 14: @@ -53855,7 +54160,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); } break; case 19: @@ -53871,7 +54176,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 4)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 4U)); } break; case 21: @@ -53887,7 +54192,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 2)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 2U)); } break; case 23: @@ -53903,7 +54208,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); } break; case 25: @@ -53919,7 +54224,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); } break; case 27: @@ -53935,7 +54240,7 @@ class TestGeneralCommissioningSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); } break; case 29: @@ -54329,7 +54634,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); } break; case 2: @@ -54338,7 +54643,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); } break; case 3: @@ -54347,7 +54652,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand chip::FabricIndex value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } break; @@ -54356,7 +54661,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand { chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusCode", value.statusCode, 11)); + VerifyOrReturn(CheckValue("statusCode", value.statusCode, 11U)); } break; case 5: @@ -54380,7 +54685,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand { chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("statusCode", value.statusCode, 0)); + VerifyOrReturn(CheckValue("statusCode", value.statusCode, 0U)); VerifyOrReturn(CheckValuePresent("fabricIndex", value.fabricIndex)); VerifyOrReturn(CheckValue("fabricIndex.Value()", value.fabricIndex.Value(), ourFabricIndex)); @@ -54443,7 +54748,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand LogStep(4, "Remove nonexistent fabric"); ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = 243; + value.fabricIndex = 243U; return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Commands::RemoveFabric::Id, value, chip::NullOptional @@ -54546,7 +54851,7 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 0)); VerifyOrReturn( CheckValueAsString("supportedModes[0].label", iter_0.GetValue().label, chip::CharSpan("Black", 5))); - VerifyOrReturn(CheckValue("supportedModes[0].mode", iter_0.GetValue().mode, 0)); + VerifyOrReturn(CheckValue("supportedModes[0].mode", iter_0.GetValue().mode, 0U)); { auto iter_2 = iter_0.GetValue().semanticTags.begin(); VerifyOrReturn(CheckNextListItemDecodes( @@ -54557,7 +54862,7 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 1)); VerifyOrReturn( CheckValueAsString("supportedModes[1].label", iter_0.GetValue().label, chip::CharSpan("Cappuccino", 10))); - VerifyOrReturn(CheckValue("supportedModes[1].mode", iter_0.GetValue().mode, 4)); + VerifyOrReturn(CheckValue("supportedModes[1].mode", iter_0.GetValue().mode, 4U)); { auto iter_2 = iter_0.GetValue().semanticTags.begin(); VerifyOrReturn(CheckNextListItemDecodes( @@ -54568,7 +54873,7 @@ class TestModeSelectClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("supportedModes", iter_0, 2)); VerifyOrReturn( CheckValueAsString("supportedModes[2].label", iter_0.GetValue().label, chip::CharSpan("Espresso", 8))); - VerifyOrReturn(CheckValue("supportedModes[2].mode", iter_0.GetValue().mode, 7)); + VerifyOrReturn(CheckValue("supportedModes[2].mode", iter_0.GetValue().mode, 7U)); { auto iter_2 = iter_0.GetValue().semanticTags.begin(); VerifyOrReturn(CheckNextListItemDecodes( @@ -54585,7 +54890,7 @@ class TestModeSelectClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 0)); + VerifyOrReturn(CheckValue("currentMode", value, 0U)); } break; case 5: @@ -54594,7 +54899,7 @@ class TestModeSelectClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("startUpMode", value)); - VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 0U)); } break; case 6: @@ -54613,7 +54918,7 @@ class TestModeSelectClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 4)); + VerifyOrReturn(CheckValue("currentMode", value, 4U)); currentModeBeforeToggle = value; } @@ -54647,7 +54952,7 @@ class TestModeSelectClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("onMode", value)); - VerifyOrReturn(CheckValue("onMode.Value()", value.Value(), 7)); + VerifyOrReturn(CheckValue("onMode.Value()", value.Value(), 7U)); OnModeValue = value; } @@ -54678,7 +54983,7 @@ class TestModeSelectClusterSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("startUpMode", value)); - VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 7)); + VerifyOrReturn(CheckValue("startUpMode.Value()", value.Value(), 7U)); } break; case 22: @@ -54703,7 +55008,7 @@ class TestModeSelectClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 4)); + VerifyOrReturn(CheckValue("currentMode", value, 4U)); } break; case 28: @@ -54722,7 +55027,7 @@ class TestModeSelectClusterSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentMode", value, 7)); + VerifyOrReturn(CheckValue("currentMode", value, 7U)); } break; default: @@ -54781,7 +55086,7 @@ class TestModeSelectClusterSuite : public TestCommand LogStep(7, "Change to Supported Mode"); ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; - value.newMode = 4; + value.newMode = 4U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Commands::ChangeToMode::Id, value, chip::NullOptional @@ -54796,7 +55101,7 @@ class TestModeSelectClusterSuite : public TestCommand LogStep(9, "Change to Unsupported Mode"); ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; - value.newMode = 2; + value.newMode = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Commands::ChangeToMode::Id, value, chip::NullOptional @@ -54828,7 +55133,7 @@ class TestModeSelectClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 2; + value.Value() = 2U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -54837,7 +55142,7 @@ class TestModeSelectClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 7; + value.Value() = 7U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -54872,7 +55177,7 @@ class TestModeSelectClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 2; + value.Value() = 2U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -54881,7 +55186,7 @@ class TestModeSelectClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 7; + value.Value() = 7U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::StartUpMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -54894,7 +55199,7 @@ class TestModeSelectClusterSuite : public TestCommand LogStep(22, "Change CurrentMode to another value"); ListFreer listFreer; chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type value; - value.newMode = 0; + value.newMode = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Commands::ChangeToMode::Id, value, chip::NullOptional @@ -54905,7 +55210,7 @@ class TestModeSelectClusterSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 4; + value.Value() = 4U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::OnMode::Id, value, chip::NullOptional, chip::NullOptional); } @@ -55015,7 +55320,7 @@ class TestSelfFabricRemovalSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("commissionedFabrics", value, 1)); + VerifyOrReturn(CheckValue("commissionedFabrics", value, 1U)); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); } break; @@ -55025,7 +55330,7 @@ class TestSelfFabricRemovalSuite : public TestCommand chip::FabricIndex value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); ourFabricIndex = value; } break; @@ -55481,7 +55786,7 @@ class TestBindingSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 0)); VerifyOrReturn(CheckValuePresent("binding[0].group", iter_0.GetValue().group)); VerifyOrReturn(CheckValue("binding[0].group.Value()", iter_0.GetValue().group.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 1)); VerifyOrReturn(CheckValuePresent("binding[1].node", iter_0.GetValue().node)); VerifyOrReturn(CheckValue("binding[1].node.Value()", iter_0.GetValue().node.Value(), 1ULL)); @@ -55489,13 +55794,13 @@ class TestBindingSuite : public TestCommand VerifyOrReturn(CheckValue("binding[1].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); VerifyOrReturn(CheckValuePresent("binding[1].cluster", iter_0.GetValue().cluster)); VerifyOrReturn(CheckValue("binding[1].cluster.Value()", iter_0.GetValue().cluster.Value(), 6UL)); - VerifyOrReturn(CheckValue("binding[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("binding[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 2)); VerifyOrReturn(CheckValuePresent("binding[2].node", iter_0.GetValue().node)); VerifyOrReturn(CheckValue("binding[2].node.Value()", iter_0.GetValue().node.Value(), 2ULL)); VerifyOrReturn(CheckValuePresent("binding[2].endpoint", iter_0.GetValue().endpoint)); VerifyOrReturn(CheckValue("binding[2].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[2].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("binding[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("binding", iter_0, 3)); } } @@ -55515,7 +55820,7 @@ class TestBindingSuite : public TestCommand VerifyOrReturn(CheckValue("binding[0].node.Value()", iter_0.GetValue().node.Value(), 3ULL)); VerifyOrReturn(CheckValuePresent("binding[0].endpoint", iter_0.GetValue().endpoint)); VerifyOrReturn(CheckValue("binding[0].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("binding", iter_0, 1)); } } @@ -55530,7 +55835,7 @@ class TestBindingSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 0)); VerifyOrReturn(CheckValuePresent("binding[0].group", iter_0.GetValue().group)); VerifyOrReturn(CheckValue("binding[0].group.Value()", iter_0.GetValue().group.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("binding[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 1)); VerifyOrReturn(CheckValuePresent("binding[1].node", iter_0.GetValue().node)); VerifyOrReturn(CheckValue("binding[1].node.Value()", iter_0.GetValue().node.Value(), 1ULL)); @@ -55538,13 +55843,13 @@ class TestBindingSuite : public TestCommand VerifyOrReturn(CheckValue("binding[1].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); VerifyOrReturn(CheckValuePresent("binding[1].cluster", iter_0.GetValue().cluster)); VerifyOrReturn(CheckValue("binding[1].cluster.Value()", iter_0.GetValue().cluster.Value(), 6UL)); - VerifyOrReturn(CheckValue("binding[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("binding[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("binding", iter_0, 2)); VerifyOrReturn(CheckValuePresent("binding[2].node", iter_0.GetValue().node)); VerifyOrReturn(CheckValue("binding[2].node.Value()", iter_0.GetValue().node.Value(), 2ULL)); VerifyOrReturn(CheckValuePresent("binding[2].endpoint", iter_0.GetValue().endpoint)); VerifyOrReturn(CheckValue("binding[2].endpoint.Value()", iter_0.GetValue().endpoint.Value(), 1U)); - VerifyOrReturn(CheckValue("binding[2].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("binding[2].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("binding", iter_0, 3)); } } @@ -55594,7 +55899,7 @@ class TestBindingSuite : public TestCommand auto * listHolder_0 = new ListHolder(2); listFreer.add(listHolder_0); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].node.Emplace(); listHolder_0->mList[1].node.Value() = 1ULL; @@ -55604,7 +55909,7 @@ class TestBindingSuite : public TestCommand listHolder_0->mList[1].endpoint.Value() = 1U; listHolder_0->mList[1].cluster.Emplace(); listHolder_0->mList[1].cluster.Value() = 6UL; - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List(listHolder_0->mList, 2); @@ -55623,7 +55928,7 @@ class TestBindingSuite : public TestCommand listHolder_0->mList[0].group.Emplace(); listHolder_0->mList[0].group.Value() = 1U; - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].node.Emplace(); listHolder_0->mList[1].node.Value() = 1ULL; @@ -55631,13 +55936,13 @@ class TestBindingSuite : public TestCommand listHolder_0->mList[1].endpoint.Value() = 1U; listHolder_0->mList[1].cluster.Emplace(); listHolder_0->mList[1].cluster.Value() = 6UL; - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; listHolder_0->mList[2].node.Emplace(); listHolder_0->mList[2].node.Value() = 2ULL; listHolder_0->mList[2].endpoint.Emplace(); listHolder_0->mList[2].endpoint.Value() = 1U; - listHolder_0->mList[2].fabricIndex = 0; + listHolder_0->mList[2].fabricIndex = 0U; value = chip::app::DataModel::List(listHolder_0->mList, 3); @@ -55663,7 +55968,7 @@ class TestBindingSuite : public TestCommand listHolder_0->mList[0].node.Value() = 3ULL; listHolder_0->mList[0].endpoint.Emplace(); listHolder_0->mList[0].endpoint.Value() = 1U; - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; value = chip::app::DataModel::List(listHolder_0->mList, 1); @@ -55927,7 +56232,7 @@ class TestArmFailSafeSuite : public TestCommand { chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0)); + VerifyOrReturn(CheckValue("errorCode", value.errorCode, 0U)); } break; case 4: @@ -56101,7 +56406,7 @@ class TestFanControlSuite : public TestCommand { chip::app::Clusters::FanControl::FanModeType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("fanMode", value, 3)); + VerifyOrReturn(CheckValue("fanMode", value, 3U)); } break; case 3: @@ -56112,7 +56417,7 @@ class TestFanControlSuite : public TestCommand { chip::app::Clusters::FanControl::FanModeSequenceType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("fanModeSequence", value, 5)); + VerifyOrReturn(CheckValue("fanModeSequence", value, 5U)); } break; case 5: @@ -56124,7 +56429,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84)); + VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84U)); } break; case 7: @@ -56133,7 +56438,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 84)); + VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 84U)); } break; case 8: @@ -56141,7 +56446,7 @@ class TestFanControlSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("speedCurrent", value, 84)); + VerifyOrReturn(CheckValue("speedCurrent", value, 84U)); } break; case 9: @@ -56153,7 +56458,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84)); + VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 84U)); } break; case 11: @@ -56165,7 +56470,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 73)); + VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 73U)); } break; case 13: @@ -56174,7 +56479,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 73)); + VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 73U)); } break; case 14: @@ -56182,7 +56487,7 @@ class TestFanControlSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("percentCurrent", value, 73)); + VerifyOrReturn(CheckValue("percentCurrent", value, 73U)); } break; case 15: @@ -56194,7 +56499,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 73)); + VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 73U)); } break; case 17: @@ -56206,7 +56511,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("percentSetting", value)); - VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("percentSetting.Value()", value.Value(), 0U)); } break; case 19: @@ -56214,7 +56519,7 @@ class TestFanControlSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("percentCurrent", value, 0)); + VerifyOrReturn(CheckValue("percentCurrent", value, 0U)); } break; case 20: @@ -56223,7 +56528,7 @@ class TestFanControlSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("speedSetting", value)); - VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 0)); + VerifyOrReturn(CheckValue("speedSetting.Value()", value.Value(), 0U)); } break; case 21: @@ -56231,7 +56536,7 @@ class TestFanControlSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("speedCurrent", value, 0)); + VerifyOrReturn(CheckValue("speedCurrent", value, 0U)); } break; case 22: @@ -56306,7 +56611,7 @@ class TestFanControlSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 84; + value.Value() = 84U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::PercentSetting::Id, value, chip::NullOptional, chip::NullOptional); } @@ -56343,7 +56648,7 @@ class TestFanControlSuite : public TestCommand ListFreer listFreer; chip::app::DataModel::Nullable value; value.SetNonNull(); - value.Value() = 73; + value.Value() = 73U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), FanControl::Id, FanControl::Attributes::SpeedSetting::Id, value, chip::NullOptional, chip::NullOptional); } @@ -56735,10 +57040,10 @@ class TestMultiAdminSuite : public TestCommand } }; -class Test_TC_SWDIAG_1_1Suite : public TestCommand +class Test_TC_DGSW_2_1Suite : public TestCommand { public: - Test_TC_SWDIAG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWDIAG_1_1", 5, credsIssuerConfig) + Test_TC_DGSW_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_1", 5, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -56746,7 +57051,7 @@ class Test_TC_SWDIAG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWDIAG_1_1Suite() {} + ~Test_TC_DGSW_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -56785,10 +57090,6 @@ class Test_TC_SWDIAG_1_1Suite : public TestCommand } break; case 2: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint64_t value; @@ -56797,10 +57098,6 @@ class Test_TC_SWDIAG_1_1Suite : public TestCommand } break; case 3: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint64_t value; @@ -56809,10 +57106,6 @@ class Test_TC_SWDIAG_1_1Suite : public TestCommand } break; case 4: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint64_t value; @@ -56844,24 +57137,25 @@ class Test_TC_SWDIAG_1_1Suite : public TestCommand } case 1: { LogStep(1, "Reads a list of ThreadMetrics struct non-global attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_THREADMETRICS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), 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.A0002"), 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("A_CURRENTHEAPUSED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.A0003"), 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("A_CURRENTHEAPHIGHWATERMARK"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id, true, chip::NullOptional); } @@ -56870,10 +57164,10 @@ class Test_TC_SWDIAG_1_1Suite : public TestCommand } }; -class Test_TC_SWDIAG_2_1Suite : public TestCommand +class Test_TC_DGSW_2_2Suite : public TestCommand { public: - Test_TC_SWDIAG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWDIAG_2_1", 1, credsIssuerConfig) + Test_TC_DGSW_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_2", 1, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -56881,7 +57175,7 @@ class Test_TC_SWDIAG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWDIAG_2_1Suite() {} + ~Test_TC_DGSW_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -56942,10 +57236,10 @@ class Test_TC_SWDIAG_2_1Suite : public TestCommand } }; -class Test_TC_SWDIAG_3_1Suite : public TestCommand +class Test_TC_DGSW_2_3Suite : public TestCommand { public: - Test_TC_SWDIAG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWDIAG_3_1", 5, credsIssuerConfig) + Test_TC_DGSW_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_2_3", 5, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -56953,7 +57247,7 @@ class Test_TC_SWDIAG_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWDIAG_3_1Suite() {} + ~Test_TC_DGSW_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -56995,10 +57289,6 @@ class Test_TC_SWDIAG_3_1Suite : public TestCommand } break; case 3: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint64_t value; @@ -57007,10 +57297,6 @@ class Test_TC_SWDIAG_3_1Suite : public TestCommand } break; case 4: - if (IsUnsupported(status.mStatus)) - { - return; - } VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint64_t value; @@ -57042,7 +57328,7 @@ class Test_TC_SWDIAG_3_1Suite : public TestCommand } case 1: { LogStep(1, "Sends ResetWatermarks to DUT"); - VerifyOrDo(!ShouldSkip("CR_RESETWATERMARKS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.C00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, @@ -57052,19 +57338,19 @@ class Test_TC_SWDIAG_3_1Suite : public TestCommand } case 2: { LogStep(2, "Reads a list of ThreadMetrics struct attribute from DUT."); - VerifyOrDo(!ShouldSkip("A_THREADMETRICS"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id, true, chip::NullOptional); } case 3: { LogStep(3, "Reads CurrentHeapUsed attribute value from DUT"); - VerifyOrDo(!ShouldSkip("A_CURRENTHEAPUSED"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.A0003"), 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 attribute value from DUT"); - VerifyOrDo(!ShouldSkip("A_CURRENTHEAPHIGHWATERMARK"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id, true, chip::NullOptional); } @@ -57316,21 +57602,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57354,21 +57640,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57390,21 +57676,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userUniqueId.Value()", value.userUniqueId.Value(), 305441741UL)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57426,21 +57712,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userUniqueId.Value()", value.userUniqueId.Value(), 305441741UL)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57462,21 +57748,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userUniqueId.Value()", value.userUniqueId.Value(), 305441741UL)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 6)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 6U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57498,21 +57784,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userUniqueId.Value()", value.userUniqueId.Value(), 305441741UL)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 3U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 6)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 6U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 2)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 2U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57534,21 +57820,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userUniqueId.Value()", value.userUniqueId.Value(), 466460832UL)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 1)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 1U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57570,21 +57856,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userUniqueId.Value()", value.userUniqueId.Value(), 12648430UL)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 1)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 2)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 2U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57605,21 +57891,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57676,21 +57962,21 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNull("credentials", value.credentials)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); @@ -57794,7 +58080,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -57816,28 +58102,28 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57853,10 +58139,10 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } @@ -57866,7 +58152,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -57879,7 +58165,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -57923,7 +58209,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -57944,31 +58230,31 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 2)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -57984,10 +58270,10 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } @@ -57997,7 +58283,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58010,7 +58296,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58022,7 +58308,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58035,7 +58321,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58048,7 +58334,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58061,7 +58347,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58074,7 +58360,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58087,7 +58373,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58100,7 +58386,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58113,7 +58399,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2)); + VerifyOrReturn(CheckValue("status", value.status, 2U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58126,7 +58412,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2)); + VerifyOrReturn(CheckValue("status", value.status, 2U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58139,7 +58425,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58152,7 +58438,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); @@ -58166,7 +58452,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 2)); + VerifyOrReturn(CheckValue("status", value.status, 2U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58179,7 +58465,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58200,34 +58486,34 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2U)); VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 4U)); VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 3)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); @@ -58238,7 +58524,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58259,37 +58545,37 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 2U)); VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 4U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 3)); - VerifyOrReturn(CheckValue("credentials.Value()[3].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[3].credentialType", iter_1.GetValue().credentialType, 1U)); VerifyOrReturn(CheckValue("credentials.Value()[3].credentialIndex", iter_1.GetValue().credentialIndex, 5U)); VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 4)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); @@ -58328,34 +58614,34 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 2U)); VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 2U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 1)); - VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2)); + VerifyOrReturn(CheckValue("credentials.Value()[1].credentialType", iter_1.GetValue().credentialType, 2U)); VerifyOrReturn(CheckValue("credentials.Value()[1].credentialIndex", iter_1.GetValue().credentialIndex, 4U)); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 2)); - VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[2].credentialType", iter_1.GetValue().credentialType, 1U)); VerifyOrReturn(CheckValue("credentials.Value()[2].credentialIndex", iter_1.GetValue().credentialIndex, 5U)); VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 3)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("nextUserIndex", value.nextUserIndex)); VerifyOrReturn(CheckValue("nextUserIndex.Value()", value.nextUserIndex.Value(), 2U)); @@ -58412,7 +58698,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); @@ -58488,28 +58774,28 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 1U)); VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 5U)); VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -58545,7 +58831,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); @@ -58559,7 +58845,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 3U)); @@ -58573,7 +58859,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 4U)); @@ -58742,7 +59028,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58754,7 +59040,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -58775,28 +59061,28 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValueNull("userUniqueId", value.userUniqueId)); VerifyOrReturn(CheckValueNonNull("userStatus", value.userStatus)); - VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1)); + VerifyOrReturn(CheckValue("userStatus.Value()", value.userStatus.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("userType", value.userType)); - VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0)); + VerifyOrReturn(CheckValue("userType.Value()", value.userType.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentialRule", value.credentialRule)); - VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0)); + VerifyOrReturn(CheckValue("credentialRule.Value()", value.credentialRule.Value(), 0U)); VerifyOrReturn(CheckValueNonNull("credentials", value.credentials)); { auto iter_1 = value.credentials.Value().begin(); VerifyOrReturn(CheckNextListItemDecodes("credentials.Value()", iter_1, 0)); - VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 0)); + VerifyOrReturn(CheckValue("credentials.Value()[0].credentialType", iter_1.GetValue().credentialType, 0U)); VerifyOrReturn(CheckValue("credentials.Value()[0].credentialIndex", iter_1.GetValue().credentialIndex, 0U)); VerifyOrReturn(CheckNoMoreListItems("credentials.Value()", iter_1, 1)); } VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextUserIndex", value.nextUserIndex)); } @@ -58812,10 +59098,10 @@ class DL_UsersAndCredentialsSuite : public TestCommand VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", value.creatorFabricIndex)); - VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex.Value()", value.creatorFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", value.lastModifiedFabricIndex)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex.Value()", value.lastModifiedFabricIndex.Value(), 1U)); VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } @@ -58825,7 +59111,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58900,7 +59186,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -58914,7 +59200,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58927,7 +59213,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58940,7 +59226,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58953,7 +59239,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -58966,7 +59252,7 @@ class DL_UsersAndCredentialsSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 137)); + VerifyOrReturn(CheckValue("status", value.status, 137U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); @@ -60642,7 +60928,7 @@ class DL_LockUnlockSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; case 3: @@ -60654,7 +60940,7 @@ class DL_LockUnlockSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; case 5: @@ -60662,7 +60948,7 @@ class DL_LockUnlockSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -60680,7 +60966,7 @@ class DL_LockUnlockSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; case 8: @@ -60692,7 +60978,7 @@ class DL_LockUnlockSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; case 10: @@ -60704,7 +60990,7 @@ class DL_LockUnlockSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 2U)); } break; case 12: @@ -60716,7 +61002,7 @@ class DL_LockUnlockSuite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; case 14: @@ -60923,7 +61209,7 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -60947,7 +61233,7 @@ class DL_SchedulesSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfWeekDaySchedulesSupportedPerUser", value, 10)); + VerifyOrReturn(CheckValue("numberOfWeekDaySchedulesSupportedPerUser", value, 10U)); NumberOfWeekDaySchedulesSupportedPerUser = value; } @@ -60957,7 +61243,7 @@ class DL_SchedulesSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfYearDaySchedulesSupportedPerUser", value, 10)); + VerifyOrReturn(CheckValue("numberOfYearDaySchedulesSupportedPerUser", value, 10U)); NumberOfYearDaySchedulesSupportedPerUser = value; } @@ -60967,7 +61253,7 @@ class DL_SchedulesSuite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfHolidaySchedulesSupported", value, 10)); + VerifyOrReturn(CheckValue("numberOfHolidaySchedulesSupported", value, 10U)); NumberOfHolidaySchedulesSupported = value; } @@ -61019,11 +61305,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 21: @@ -61031,11 +61317,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 0)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 0U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 22: @@ -61048,7 +61334,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 23: @@ -61056,11 +61342,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 0U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 24: @@ -61068,11 +61354,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, static_cast(NumberOfTotalUsersSupported + 1))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 25: @@ -61080,11 +61366,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 26: @@ -61110,11 +61396,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 33: @@ -61122,11 +61408,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 0)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 0U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 34: @@ -61139,7 +61425,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 35: @@ -61147,11 +61433,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 0U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 36: @@ -61159,11 +61445,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, static_cast(NumberOfTotalUsersSupported + 1))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 37: @@ -61171,11 +61457,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 38: @@ -61195,9 +61481,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 43: @@ -61205,9 +61491,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 0)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 0U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 44: @@ -61218,7 +61504,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn( CheckValue("holidayIndex", value.holidayIndex, static_cast(NumberOfHolidaySchedulesSupported + 1))); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); } break; case 45: @@ -61229,9 +61515,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61240,7 +61526,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); } break; case 47: @@ -61251,26 +61537,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); } break; case 49: @@ -61281,11 +61567,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61314,26 +61600,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); } break; case 57: @@ -61341,11 +61627,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61359,9 +61645,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61370,7 +61656,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); } break; case 59: @@ -61393,26 +61679,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); } break; case 65: @@ -61420,11 +61706,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61438,9 +61724,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61449,7 +61735,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); } break; case 67: @@ -61463,26 +61749,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 15U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 16U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 18U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 0U)); } break; case 70: @@ -61490,11 +61776,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61508,9 +61794,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61519,7 +61805,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); } break; case 72: @@ -61530,26 +61816,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); } break; case 74: @@ -61560,11 +61846,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); @@ -61581,9 +61867,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); @@ -61592,7 +61878,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1U)); } break; case 78: @@ -61603,11 +61889,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 80: @@ -61618,11 +61904,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 82: @@ -61630,11 +61916,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61648,11 +61934,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); @@ -61666,9 +61952,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61677,7 +61963,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); } break; case 85: @@ -61685,9 +61971,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); @@ -61696,7 +61982,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1U)); } break; case 86: @@ -61710,11 +61996,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 89: @@ -61725,11 +62011,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 91: @@ -61737,26 +62023,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 2U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); } break; case 92: @@ -61773,26 +62059,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); } break; case 96: @@ -61803,11 +62089,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); @@ -61824,26 +62110,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 64)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 64U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 23)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 23U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); } break; case 100: @@ -61854,11 +62140,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 55555UL)); @@ -61875,11 +62161,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 104: @@ -61887,11 +62173,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 4U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 105: @@ -61899,11 +62185,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 4U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 106: @@ -61911,11 +62197,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 107: @@ -61923,9 +62209,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -61934,7 +62220,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); } break; case 108: @@ -61942,9 +62228,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 123456UL)); @@ -61953,7 +62239,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 1234567UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 1U)); } break; case 109: @@ -61966,7 +62252,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1UL)); @@ -61975,7 +62261,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 100UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4U)); } break; case 111: @@ -61983,7 +62269,7 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -62006,9 +62292,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 12345UL)); @@ -62017,7 +62303,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 12345689UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 0U)); } break; case 116: @@ -62025,9 +62311,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 117: @@ -62037,7 +62323,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 1UL)); @@ -62046,7 +62332,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckValue("localEndTime.Value()", value.localEndTime.Value(), 100UL)); VerifyOrReturn(CheckValuePresent("operatingMode", value.operatingMode)); - VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4)); + VerifyOrReturn(CheckValue("operatingMode.Value()", value.operatingMode.Value(), 4U)); } break; case 118: @@ -62054,26 +62340,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); } break; case 119: @@ -62081,11 +62367,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); @@ -62102,9 +62388,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 122: @@ -62112,9 +62398,9 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2)); + VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 123: @@ -62124,7 +62410,7 @@ class DL_SchedulesSuite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("holidayIndex", value.holidayIndex, NumberOfHolidaySchedulesSupported)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); } break; case 124: @@ -62132,26 +62418,26 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("daysMask", value.daysMask)); - VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1)); + VerifyOrReturn(CheckValue("daysMask.Value()", value.daysMask.Value(), 1U)); VerifyOrReturn(CheckValuePresent("startHour", value.startHour)); - VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0)); + VerifyOrReturn(CheckValue("startHour.Value()", value.startHour.Value(), 0U)); VerifyOrReturn(CheckValuePresent("startMinute", value.startMinute)); - VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0)); + VerifyOrReturn(CheckValue("startMinute.Value()", value.startMinute.Value(), 0U)); VerifyOrReturn(CheckValuePresent("endHour", value.endHour)); - VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckValue("endHour.Value()", value.endHour.Value(), 23U)); VerifyOrReturn(CheckValuePresent("endMinute", value.endMinute)); - VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckValue("endMinute.Value()", value.endMinute.Value(), 59U)); } break; case 125: @@ -62159,11 +62445,11 @@ class DL_SchedulesSuite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 9000UL)); @@ -62239,13 +62525,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(6, "Create Week Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 0; + value.weekDayIndex = 0U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62257,11 +62543,11 @@ class DL_SchedulesSuite : public TestCommand chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; value.weekDayIndex = static_cast(NumberOfWeekDaySchedulesSupportedPerUser + 1); value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62271,13 +62557,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(8, "Create Week Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 0U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62287,13 +62573,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(9, "Create Week Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62303,13 +62589,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(10, "Create Week Day schedule for non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 2U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62319,13 +62605,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(11, "Create Week Day schedule with 0 days mask"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(0); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(0U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62335,13 +62621,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(12, "Create Week Day schedule for Sunday and Monday"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(3); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(3U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62351,13 +62637,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(13, "Create Week Day schedule for Sunday Wednesday and Saturday"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(73); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(73U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62367,13 +62653,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(14, "Create Week Day schedule with invalid start hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 24; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 24U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62383,13 +62669,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(15, "Create Week Day schedule with invalid start minute"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 60; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 60U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62399,13 +62685,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(16, "Create Week Day schedule with invalid end hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 24; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 24U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62415,13 +62701,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(17, "Create Week Day schedule with invalid end minute"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 60; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 60U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62431,13 +62717,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(18, "Create Week Day schedule with start hour later that end hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 19; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 19U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62447,13 +62733,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(19, "Create Week Day schedule with start minute later that end minute when hours are equal"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 50; - value.endHour = 15; - value.endMinute = 49; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 50U; + value.endHour = 15U; + value.endMinute = 49U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62463,7 +62749,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(20, "Make sure that previous operations did not create a schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62474,7 +62760,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(21, "Get Week Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 0; + value.weekDayIndex = 0U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62496,7 +62782,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(23, "Get Week Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62507,7 +62793,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(24, "Get Week Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62518,7 +62804,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(25, "Get Week Day schedule with non-existing user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62529,7 +62815,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(26, "Create Year Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 0; + value.yearDayIndex = 0U; value.userIndex = 1U; value.localStartTime = 12345UL; value.localEndTime = 12345689UL; @@ -62555,7 +62841,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(28, "Create Year Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 0U; value.localStartTime = 12345UL; value.localEndTime = 12345689UL; @@ -62568,7 +62854,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(29, "Create Year Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); value.localStartTime = 12345UL; value.localEndTime = 12345689UL; @@ -62581,7 +62867,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(30, "Create Year Day schedule for non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 2U; value.localStartTime = 12345UL; value.localEndTime = 12345689UL; @@ -62594,7 +62880,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(31, "Create Year Day schedule with start hour later that end hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; value.localStartTime = 12345689UL; value.localEndTime = 12345688UL; @@ -62607,7 +62893,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(32, "Make sure that previous operations did not create a schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62618,7 +62904,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(33, "Get Year Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 0; + value.yearDayIndex = 0U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62640,7 +62926,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(35, "Get Year Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62651,7 +62937,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(36, "Get Year Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62662,7 +62948,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(37, "Get Year Day schedule with non-existing user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62673,7 +62959,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(38, "Create Holiday schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 0; + value.holidayIndex = 0U; value.localStartTime = 12345UL; value.localEndTime = 12345689UL; value.operatingMode = static_cast(0); @@ -62699,7 +62985,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(40, "Create Holiday schedule with start hour later that end hour"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; value.localStartTime = 12345689UL; value.localEndTime = 12345688UL; value.operatingMode = static_cast(0); @@ -62712,7 +62998,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(41, "Create Holiday schedule with invalid operating mode"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; value.localStartTime = 12345UL; value.localEndTime = 12345689UL; value.operatingMode = static_cast(5); @@ -62725,7 +63011,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(42, "Make sure that previous operations did not create a schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -62735,7 +63021,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(43, "Get Holiday schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 0; + value.holidayIndex = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -62755,7 +63041,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(45, "Create Holiday schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; value.localStartTime = 12345UL; value.localEndTime = 12345689UL; value.operatingMode = static_cast(0); @@ -62768,7 +63054,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(46, "Verify created schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -62778,13 +63064,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(47, "Create Week Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 15; - value.startMinute = 16; - value.endHour = 18; - value.endMinute = 0; + value.daysMask = static_cast>(1U); + value.startHour = 15U; + value.startMinute = 16U; + value.endHour = 18U; + value.endMinute = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -62794,7 +63080,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(48, "Verify created schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62805,7 +63091,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(49, "Create Year Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; value.localStartTime = 12345UL; value.localEndTime = 12345689UL; @@ -62818,7 +63104,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(50, "Verify created schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62829,7 +63115,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(51, "Clear Week Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 0; + value.weekDayIndex = 0U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -62851,7 +63137,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(53, "Clear Week Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -62862,7 +63148,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(54, "Clear Week Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -62873,7 +63159,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(55, "Clear Week Day schedule with non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -62884,7 +63170,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(56, "Make sure that week day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62895,7 +63181,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(57, "Make sure that year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62906,7 +63192,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(58, "Make sure that holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -62916,7 +63202,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(59, "Clear Year Day schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 0; + value.yearDayIndex = 0U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, chip::NullOptional @@ -62938,7 +63224,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(61, "Clear Year Day schedule with 0 user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, chip::NullOptional @@ -62949,7 +63235,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(62, "Clear Year Day schedule with out-of-bounds user index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = static_cast(NumberOfTotalUsersSupported + 1); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, chip::NullOptional @@ -62960,7 +63246,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(63, "Clear Year Day schedule with non-existing user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, chip::NullOptional @@ -62971,7 +63257,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(64, "Make sure that week day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -62982,7 +63268,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(65, "Make sure that year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -62993,7 +63279,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(66, "Make sure that holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63003,7 +63289,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(67, "Clear Holiday schedule with 0 index"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = 0; + value.holidayIndex = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, chip::NullOptional @@ -63023,7 +63309,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(69, "Make sure that week day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63034,7 +63320,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(70, "Make sure that year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63045,7 +63331,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(71, "Make sure that holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63055,13 +63341,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(72, "Create another Week Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 2; + value.weekDayIndex = 2U; value.userIndex = 1U; - value.daysMask = static_cast>(2); - value.startHour = 0; - value.startMinute = 0; - value.endHour = 23; - value.endMinute = 59; + value.daysMask = static_cast>(2U); + value.startHour = 0U; + value.startMinute = 0U; + value.endHour = 23U; + value.endMinute = 59U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -63071,7 +63357,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(73, "Verify created week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 2; + value.weekDayIndex = 2U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63082,7 +63368,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(74, "Create another Year Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 1U; value.localStartTime = 9000UL; value.localEndTime = 888888888UL; @@ -63095,7 +63381,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(75, "Verify created year day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63106,7 +63392,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(76, "Create another Holiday schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type value; - value.holidayIndex = 2; + value.holidayIndex = 2U; value.localStartTime = 123456UL; value.localEndTime = 1234567UL; value.operatingMode = static_cast(1); @@ -63119,7 +63405,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(77, "Verify created holiday schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2; + value.holidayIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63129,7 +63415,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(78, "Clear a single week day schedule for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -63140,7 +63426,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(79, "Verify cleared week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63151,7 +63437,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(80, "Clear all remaining week day schedules for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 254; + value.weekDayIndex = 254U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -63162,7 +63448,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(81, "Verify cleared week schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 2; + value.weekDayIndex = 2U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63173,7 +63459,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(82, "Make sure that first year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63184,7 +63470,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(83, "Make sure that second year day schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63195,7 +63481,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(84, "Make sure that first holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63205,7 +63491,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(85, "Make sure that second holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2; + value.holidayIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63215,13 +63501,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(86, "Create another Week Day schedule with valid parameters"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(2); - value.startHour = 0; - value.startMinute = 0; - value.endHour = 23; - value.endMinute = 59; + value.daysMask = static_cast>(2U); + value.startHour = 0U; + value.startMinute = 0U; + value.endHour = 23U; + value.endMinute = 59U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -63231,7 +63517,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(87, "Clear a single year day schedule for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, chip::NullOptional @@ -63242,7 +63528,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(88, "Verify cleared year day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63253,7 +63539,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(89, "Clear all remaining year schedules for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type value; - value.yearDayIndex = 254; + value.yearDayIndex = 254U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearYearDaySchedule::Id, value, chip::NullOptional @@ -63264,7 +63550,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(90, "Verify that second year day schedule was cleared"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63275,7 +63561,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(91, "Verify created week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63286,7 +63572,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(92, "Clear all remaining week day schedules for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 254; + value.weekDayIndex = 254U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -63313,13 +63599,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(94, "Create Week Day schedule with valid parameters for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 0; - value.startMinute = 0; - value.endHour = 23; - value.endMinute = 59; + value.daysMask = static_cast>(1U); + value.startHour = 0U; + value.startMinute = 0U; + value.endHour = 23U; + value.endMinute = 59U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -63329,7 +63615,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(95, "Verify created week day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63340,7 +63626,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(96, "Create Year Day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 4; + value.yearDayIndex = 4U; value.userIndex = 1U; value.localStartTime = 9000UL; value.localEndTime = 888888888UL; @@ -63353,7 +63639,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(97, "Verify created year day schedule for first"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 4; + value.yearDayIndex = 4U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63364,13 +63650,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(98, "Create Week Day schedule with valid parameters for second user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 4; + value.weekDayIndex = 4U; value.userIndex = 2U; - value.daysMask = static_cast>(64); - value.startHour = 23; - value.startMinute = 0; - value.endHour = 23; - value.endMinute = 59; + value.daysMask = static_cast>(64U); + value.startHour = 23U; + value.startMinute = 0U; + value.endHour = 23U; + value.endMinute = 59U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -63380,7 +63666,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(99, "Verify created week day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 4; + value.weekDayIndex = 4U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63391,7 +63677,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(100, "Create Year Day schedule for second user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; value.localStartTime = 55555UL; value.localEndTime = 7777777UL; @@ -63404,7 +63690,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(101, "Verify created year day schedule for first"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63425,7 +63711,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(103, "Make sure clearing first user also cleared week day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63436,7 +63722,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(104, "Make sure clearing first user also cleared year day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 4; + value.yearDayIndex = 4U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63447,7 +63733,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(105, "Make sure clearing second user also cleared week day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 4; + value.weekDayIndex = 4U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63458,7 +63744,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(106, "Make sure clearing second user also cleared year day schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63469,7 +63755,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(107, "Make sure that first holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63479,7 +63765,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(108, "Make sure that second holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2; + value.holidayIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63530,13 +63816,13 @@ class DL_SchedulesSuite : public TestCommand LogStep(112, "Create Week Day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(1); - value.startHour = 0; - value.startMinute = 0; - value.endHour = 23; - value.endMinute = 59; + value.daysMask = static_cast>(1U); + value.startHour = 0U; + value.startMinute = 0U; + value.endHour = 23U; + value.endMinute = 59U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -63546,7 +63832,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(113, "Create Year Day schedule for first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; value.localStartTime = 9000UL; value.localEndTime = 888888888UL; @@ -63559,7 +63845,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(114, "Clear a single holiday schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = 2; + value.holidayIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, chip::NullOptional @@ -63569,7 +63855,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(115, "Make sure that first holiday schedule was not deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63579,7 +63865,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(116, "Make sure that second holiday schedule was deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2; + value.holidayIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63599,7 +63885,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(118, "Make sure clearing holiday schedule did not clear week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63610,7 +63896,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(119, "Make sure clearing holiday schedule did not clear year day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63621,7 +63907,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(120, "Clear all remaining holiday schedules"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type value; - value.holidayIndex = 254; + value.holidayIndex = 254U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearHolidaySchedule::Id, value, chip::NullOptional @@ -63631,7 +63917,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(121, "Make sure that first holiday is still deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 1; + value.holidayIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63641,7 +63927,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(122, "Make sure that second holiday schedule was deleted"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type value; - value.holidayIndex = 2; + value.holidayIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetHolidaySchedule::Id, value, chip::NullOptional @@ -63661,7 +63947,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(124, "Make sure clearing holiday schedule did not clear week day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -63672,7 +63958,7 @@ class DL_SchedulesSuite : public TestCommand LogStep(125, "Make sure clearing holiday schedule did not clear year day schedule"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -63748,7 +64034,7 @@ class Test_TC_DL_2_2Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -63786,7 +64072,7 @@ class Test_TC_DL_2_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("userCodeTemporaryDisableTime", value, 5)); + VerifyOrReturn(CheckValue("userCodeTemporaryDisableTime", value, 5U)); } break; case 14: @@ -63890,7 +64176,7 @@ class Test_TC_DL_2_2Suite : public TestCommand LogStep(7, "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT"); ListFreer listFreer; uint8_t value; - value = 3; + value = 3U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, value, chip::NullOptional, chip::NullOptional); } @@ -63898,7 +64184,7 @@ class Test_TC_DL_2_2Suite : public TestCommand LogStep(8, "TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds on the DUT"); ListFreer listFreer; uint8_t value; - value = 5; + value = 5U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, value, chip::NullOptional, chip::NullOptional); @@ -64027,7 +64313,7 @@ class Test_TC_DL_2_3Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -64063,7 +64349,7 @@ class Test_TC_DL_2_3Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; case 8: @@ -64220,7 +64506,7 @@ class Test_TC_DL_2_4Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -64256,7 +64542,7 @@ class Test_TC_DL_2_4Suite : public TestCommand chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValueNonNull("lockState", value)); - VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1)); + VerifyOrReturn(CheckValue("lockState.Value()", value.Value(), 1U)); } break; default: @@ -64400,7 +64686,7 @@ class Test_TC_DL_2_5Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -64414,7 +64700,7 @@ class Test_TC_DL_2_5Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfWeekDaySchedulesSupportedPerUser", value, 10)); + VerifyOrReturn(CheckValue("numberOfWeekDaySchedulesSupportedPerUser", value, 10U)); NumberOfWeekDaySchedulesSupportedPerUser = value; } @@ -64437,25 +64723,25 @@ class Test_TC_DL_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, 1)); + VerifyOrReturn(CheckConstraintMinValue("value.weekDayIndex", value.weekDayIndex, 1U)); VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, true)); - VerifyOrReturn(CheckConstraintMinValue("value.daysMask.Value()", value.daysMask.Value(), 0)); - VerifyOrReturn(CheckConstraintMaxValue("value.daysMask.Value()", value.daysMask.Value(), 6)); + 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(), 0)); - VerifyOrReturn(CheckConstraintMaxValue("value.startHour.Value()", value.startHour.Value(), 23)); + 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(), 0)); - VerifyOrReturn(CheckConstraintMaxValue("value.startMinute.Value()", value.startMinute.Value(), 59)); + VerifyOrReturn(CheckConstraintMinValue("value.startMinute.Value()", value.startMinute.Value(), 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value.startMinute.Value()", value.startMinute.Value(), 59U)); VerifyOrReturn(CheckConstraintHasValue("value.endHour", value.endHour, true)); - VerifyOrReturn(CheckConstraintMinValue("value.endHour.Value()", value.endHour.Value(), 0)); - VerifyOrReturn(CheckConstraintMaxValue("value.endHour.Value()", value.endHour.Value(), 23)); + VerifyOrReturn(CheckConstraintMinValue("value.endHour.Value()", value.endHour.Value(), 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value.endHour.Value()", value.endHour.Value(), 23U)); VerifyOrReturn(CheckConstraintHasValue("value.endMinute", value.endMinute, true)); - VerifyOrReturn(CheckConstraintMinValue("value.endMinute.Value()", value.endMinute.Value(), 0)); - VerifyOrReturn(CheckConstraintMaxValue("value.endMinute.Value()", value.endMinute.Value(), 59)); + VerifyOrReturn(CheckConstraintMinValue("value.endMinute.Value()", value.endMinute.Value(), 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value.endMinute.Value()", value.endMinute.Value(), 59U)); } break; case 6: @@ -64466,11 +64752,11 @@ class Test_TC_DL_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, 0)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 0U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, false)); @@ -64491,11 +64777,11 @@ class Test_TC_DL_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, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", value.weekDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.daysMask", value.daysMask, false)); @@ -64562,13 +64848,13 @@ class Test_TC_DL_2_5Suite : public TestCommand LogStep(4, "Send Set Week Day Schedule Command to DUT"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; - value.daysMask = static_cast>(2); - value.startHour = 15; - value.startMinute = 45; - value.endHour = 16; - value.endMinute = 55; + value.daysMask = static_cast>(2U); + value.startHour = 15U; + value.startMinute = 45U; + value.endHour = 16U; + value.endMinute = 55U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -64578,7 +64864,7 @@ class Test_TC_DL_2_5Suite : public TestCommand LogStep(5, "send GetWeekDay Schedule Command "); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 1; + value.weekDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -64589,13 +64875,13 @@ class Test_TC_DL_2_5Suite : public TestCommand LogStep(6, "Send Set Week Day Schedule Command to DUT and verify INVALID_COMMAND response"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type value; - value.weekDayIndex = 0; + value.weekDayIndex = 0U; value.userIndex = 1U; - value.daysMask = static_cast>(7); - value.startHour = 15; - value.startMinute = 45; - value.endHour = 16; - value.endMinute = 55; + value.daysMask = static_cast>(7U); + value.startHour = 15U; + value.startMinute = 45U; + value.endHour = 16U; + value.endMinute = 55U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetWeekDaySchedule::Id, value, chip::NullOptional @@ -64605,7 +64891,7 @@ class Test_TC_DL_2_5Suite : public TestCommand LogStep(7, "send GetWeekDay Schedule Command to DUT and verify INVALID_COMMAND response"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 0; + value.weekDayIndex = 0U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -64616,7 +64902,7 @@ class Test_TC_DL_2_5Suite : public TestCommand LogStep(8, "Clear all week day schedules for the first user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type value; - value.weekDayIndex = 254; + value.weekDayIndex = 254U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearWeekDaySchedule::Id, value, chip::NullOptional @@ -64627,7 +64913,7 @@ class Test_TC_DL_2_5Suite : public TestCommand LogStep(9, "send GetWeekDay Schedule Command "); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type value; - value.weekDayIndex = 2; + value.weekDayIndex = 2U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetWeekDaySchedule::Id, value, chip::NullOptional @@ -64687,7 +64973,7 @@ class Test_TC_DL_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 1U)); @@ -64701,7 +64987,7 @@ class Test_TC_DL_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNonNull("userIndex", value.userIndex)); VerifyOrReturn(CheckValue("userIndex.Value()", value.userIndex.Value(), 2U)); @@ -64715,7 +65001,7 @@ class Test_TC_DL_2_7Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("numberOfYearDaySchedulesSupportedPerUser", value, 10)); + VerifyOrReturn(CheckValue("numberOfYearDaySchedulesSupportedPerUser", value, 10U)); NumberOfYearDaySchedulesSupportedPerUser = value; } @@ -64738,9 +65024,9 @@ class Test_TC_DL_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, 1)); + VerifyOrReturn(CheckConstraintMinValue("value.yearDayIndex", value.yearDayIndex, 1U)); VerifyOrReturn(CheckConstraintMinValue("value.userIndex", value.userIndex, 1U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, true)); VerifyOrReturn(CheckConstraintType("value.localStartTime.Value()", "", "epoch-s")); @@ -64756,11 +65042,11 @@ class Test_TC_DL_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 21U)); - VerifyOrReturn(CheckValue("status", value.status, 133)); + VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); @@ -64772,11 +65058,11 @@ class Test_TC_DL_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 10)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 10U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 5U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); @@ -64788,11 +65074,11 @@ class Test_TC_DL_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckConstraintHasValue("value.localStartTime", value.localStartTime, false)); @@ -64807,11 +65093,11 @@ class Test_TC_DL_2_7Suite : public TestCommand { chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", value.yearDayIndex, 2U)); VerifyOrReturn(CheckValue("userIndex", value.userIndex, 2U)); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValuePresent("localStartTime", value.localStartTime)); VerifyOrReturn(CheckValue("localStartTime.Value()", value.localStartTime.Value(), 10UL)); @@ -64892,7 +65178,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(5, "Send Set Year Day Schedule Command to DUT"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; value.localStartTime = 10UL; value.localEndTime = 20UL; @@ -64905,7 +65191,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(6, "send Get Year Day Schedule Command"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 1; + value.yearDayIndex = 1U; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -64916,7 +65202,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(7, "Send Set Year Day Schedule Command to DUT and verify INVALID_COMMAND response"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 0; + value.yearDayIndex = 0U; value.userIndex = 10U; value.localStartTime = 30UL; value.localEndTime = 10UL; @@ -64929,7 +65215,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(8, "send Get Year Day Schedule Command to DUT and Verify INVALID_FIELD response"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 21U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -64940,7 +65226,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(9, "send Get Year Day Schedule Command to DUT and verify NOT_FOUND response"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 10; + value.yearDayIndex = 10U; value.userIndex = 5U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -64951,7 +65237,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(10, "send Get Year Day Schedule Command to DUT and verify NOT_FOUND response "); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -64962,7 +65248,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(11, "Send Set Year Day Schedule Command to DUT"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 2U; value.localStartTime = 10UL; value.localEndTime = 20UL; @@ -64975,7 +65261,7 @@ class Test_TC_DL_2_7Suite : public TestCommand LogStep(12, "send Get Year Day Schedule Command "); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type value; - value.yearDayIndex = 2; + value.yearDayIndex = 2U; value.userIndex = 2U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::GetYearDaySchedule::Id, value, chip::NullOptional @@ -65486,7 +65772,7 @@ class TestGroupMessagingSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); } @@ -65496,7 +65782,7 @@ class TestGroupMessagingSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); } @@ -65596,7 +65882,7 @@ class TestGroupMessagingSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); } @@ -65606,7 +65892,7 @@ class TestGroupMessagingSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); } @@ -65810,11 +66096,11 @@ class TestGroupMessagingSuite : public TestCommand listHolder_0->mList[0].groupId = 257U; listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].groupId = 258U; listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -65835,13 +66121,13 @@ class TestGroupMessagingSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(4); listHolder_0->mList[1].authMode = static_cast(3); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -65934,7 +66220,7 @@ class TestGroupMessagingSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 1); @@ -66069,11 +66355,11 @@ class TestGroupMessagingSuite : public TestCommand listHolder_0->mList[0].groupId = 257U; listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].groupId = 258U; listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -66094,13 +66380,13 @@ class TestGroupMessagingSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; listHolder_0->mList[1].privilege = static_cast(4); listHolder_0->mList[1].authMode = static_cast(3); listHolder_0->mList[1].subjects.SetNull(); listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 0; + listHolder_0->mList[1].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -66185,7 +66471,7 @@ class TestGroupMessagingSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 0; + listHolder_0->mList[0].fabricIndex = 0U; value = chip::app::DataModel::List( listHolder_0->mList, 1); @@ -66243,7 +66529,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 135)); + VerifyOrReturn(CheckValue("status", value.status, 135U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 0U)); } @@ -66253,7 +66539,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 1U)); } @@ -66263,7 +66549,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 1U)); } @@ -66273,7 +66559,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 1U)); @@ -66285,7 +66571,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 4369U)); } @@ -66310,7 +66596,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 32767U)); } @@ -66320,7 +66606,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 1U)); @@ -66332,7 +66618,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 135)); + VerifyOrReturn(CheckValue("status", value.status, 135U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 0U)); } @@ -66342,7 +66628,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 4U)); } @@ -66352,7 +66638,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 1U)); @@ -66364,7 +66650,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 4369U)); } @@ -66392,7 +66678,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 1U)); } @@ -66402,7 +66688,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 4369U)); } @@ -66412,7 +66698,7 @@ class TestGroupsClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 139)); + VerifyOrReturn(CheckValue("status", value.status, 139U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 32767U)); } @@ -66660,7 +66946,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { public: TestGroupKeyManagementClusterSuite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("TestGroupKeyManagementCluster", 20, credsIssuerConfig) + TestCommand("TestGroupKeyManagementCluster", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -66718,7 +67004,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); } @@ -66728,7 +67014,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 258U)); } @@ -66745,7 +67031,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0)); + VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0U)); VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); VerifyOrReturn( @@ -66778,11 +67064,11 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 0)); VerifyOrReturn(CheckValue("groupKeyMap[0].groupId", iter_0.GetValue().groupId, 257U)); VerifyOrReturn(CheckValue("groupKeyMap[0].groupKeySetID", iter_0.GetValue().groupKeySetID, 417U)); - VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("groupKeyMap[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("groupKeyMap", iter_0, 1)); VerifyOrReturn(CheckValue("groupKeyMap[1].groupId", iter_0.GetValue().groupId, 258U)); VerifyOrReturn(CheckValue("groupKeyMap[1].groupKeySetID", iter_0.GetValue().groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeyMap[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("groupKeyMap[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 2)); } } @@ -66801,13 +67087,13 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), chip::CharSpan("Group #1", 8))); - VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 1)); VerifyOrReturn(CheckValue("groupTable[1].groupId", iter_0.GetValue().groupId, 258U)); VerifyOrReturn(CheckValuePresent("groupTable[1].groupName", iter_0.GetValue().groupName)); VerifyOrReturn(CheckValueAsString("groupTable[1].groupName.Value()", iter_0.GetValue().groupName.Value(), chip::CharSpan("Group #2", 8))); - VerifyOrReturn(CheckValue("groupTable[1].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("groupTable[1].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 2)); } } @@ -66824,7 +67110,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 418U)); - VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 1)); + VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 1U)); VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); VerifyOrReturn( @@ -66844,7 +67130,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand { chip::app::Clusters::Groups::Commands::RemoveGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); } @@ -66863,7 +67149,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), chip::CharSpan("Group #2", 8))); - VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1)); + VerifyOrReturn(CheckValue("groupTable[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); } } @@ -66873,8 +67159,21 @@ class TestGroupKeyManagementClusterSuite : public TestCommand break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 0)); + } + } break; case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); break; default: @@ -67020,7 +67319,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand listHolder_0->mList[0].groupId = 258U; listHolder_0->mList[0].groupKeySetID = 0U; - listHolder_0->mList[0].fabricIndex = 1; + listHolder_0->mList[0].fabricIndex = 1U; value = chip::app::DataModel::List( listHolder_0->mList, 1); @@ -67039,11 +67338,11 @@ class TestGroupKeyManagementClusterSuite : public TestCommand listHolder_0->mList[0].groupId = 257U; listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1; + listHolder_0->mList[0].fabricIndex = 1U; listHolder_0->mList[1].groupId = 258U; listHolder_0->mList[1].groupKeySetID = 418U; - listHolder_0->mList[1].fabricIndex = 1; + listHolder_0->mList[1].fabricIndex = 1U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -67116,7 +67415,12 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } case 18: { - LogStep(18, "KeySet Remove 2"); + LogStep(18, "Read GroupTable 3"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); + } + case 19: { + LogStep(19, "KeySet Remove 2"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 418U; @@ -67125,8 +67429,8 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ); } - case 19: { - LogStep(19, "KeySet Read (also removed)"); + case 20: { + LogStep(20, "KeySet Read (also removed)"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; value.groupKeySetID = 418U; @@ -69302,7 +69606,7 @@ class TestGroupDemoConfigSuite : public TestCommand { chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("status", value.status, 0)); + VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValue("groupId", value.groupId, 257U)); } @@ -69394,7 +69698,7 @@ class TestGroupDemoConfigSuite : public TestCommand listHolder_0->mList[0].groupId = 257U; listHolder_0->mList[0].groupKeySetID = 417U; - listHolder_0->mList[0].fabricIndex = 1; + listHolder_0->mList[0].fabricIndex = 1U; value = chip::app::DataModel::List( listHolder_0->mList, 1); @@ -69415,7 +69719,7 @@ class TestGroupDemoConfigSuite : public TestCommand listHolder_0->mList[0].authMode = static_cast(2); listHolder_0->mList[0].subjects.SetNull(); listHolder_0->mList[0].targets.SetNull(); - listHolder_0->mList[0].fabricIndex = 1; + listHolder_0->mList[0].fabricIndex = 1U; listHolder_0->mList[1].privilege = static_cast(3); listHolder_0->mList[1].authMode = static_cast(3); @@ -69428,7 +69732,7 @@ class TestGroupDemoConfigSuite : public TestCommand listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); } listHolder_0->mList[1].targets.SetNull(); - listHolder_0->mList[1].fabricIndex = 1; + listHolder_0->mList[1].fabricIndex = 1U; value = chip::app::DataModel::List( listHolder_0->mList, 2); @@ -75528,7 +75832,7 @@ class Test_TC_MC_6_1Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1)); + VerifyOrReturn(CheckValue("currentState", value, 1U)); } break; case 4: @@ -75547,7 +75851,7 @@ class Test_TC_MC_6_1Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0)); + VerifyOrReturn(CheckValue("currentState", value, 0U)); } break; case 7: @@ -75566,7 +75870,7 @@ class Test_TC_MC_6_1Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1)); + VerifyOrReturn(CheckValue("currentState", value, 1U)); } break; case 10: @@ -75585,7 +75889,7 @@ class Test_TC_MC_6_1Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 2)); + VerifyOrReturn(CheckValue("currentState", value, 2U)); } break; default: @@ -75765,7 +76069,7 @@ class Test_TC_MC_6_2Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1)); + VerifyOrReturn(CheckValue("currentState", value, 1U)); } break; case 4: @@ -75784,7 +76088,7 @@ class Test_TC_MC_6_2Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0)); + VerifyOrReturn(CheckValue("currentState", value, 0U)); } break; case 7: @@ -76215,7 +76519,7 @@ class Test_TC_MC_6_3Suite : public TestCommand class Test_TC_MC_6_4Suite : public TestCommand { public: - Test_TC_MC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_4", 22, credsIssuerConfig) + Test_TC_MC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MC_6_4", 24, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -76268,7 +76572,7 @@ class Test_TC_MC_6_4Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 1)); + VerifyOrReturn(CheckValue("currentState", value, 1U)); } break; case 4: @@ -76295,7 +76599,7 @@ class Test_TC_MC_6_4Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0)); + VerifyOrReturn(CheckValue("currentState", value, 0U)); } break; case 8: @@ -76341,32 +76645,48 @@ class Test_TC_MC_6_4Suite : public TestCommand { chip::app::Clusters::MediaPlayback::PlaybackStateEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentState", value, 0)); + VerifyOrReturn(CheckValue("currentState", value, 0U)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + float value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("playbackSpeed", value, -1.0f)); } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } 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)); + { + float value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("playbackSpeed", value, -2.0f)); + } + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::MediaPlayback::Commands::PlaybackResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; - case 18: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { float value; @@ -76374,10 +76694,10 @@ class Test_TC_MC_6_4Suite : public TestCommand VerifyOrReturn(CheckValue("playbackSpeed", value, 1.0f)); } break; - case 20: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 4)); break; default: @@ -76506,7 +76826,12 @@ class Test_TC_MC_6_4Suite : public TestCommand true, chip::NullOptional); } case 15: { - LogStep(15, "Sends a Rewind command to the DUT"); + LogStep(15, "Reads the PlaybackSpeed attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, + true, chip::NullOptional); + } + case 16: { + LogStep(16, "Sends a Rewind command to the DUT"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; @@ -76515,16 +76840,21 @@ class Test_TC_MC_6_4Suite : public TestCommand ); } - case 16: { - LogStep(16, "log a command"); + case 17: { + LogStep(17, "log a command"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Verify that the media play has reversed directiongarbage: not in length on purpose", 49); return UserPrompt(kIdentityAlpha, value); } - case 17: { - LogStep(17, "Sends a Play command"); + case 18: { + LogStep(18, "Reads the PlaybackSpeed attribute from the DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, + true, chip::NullOptional); + } + case 19: { + LogStep(19, "Sends a Play command"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Play::Type value; @@ -76533,22 +76863,22 @@ class Test_TC_MC_6_4Suite : public TestCommand ); } - case 18: { - LogStep(18, "log a command"); + case 20: { + LogStep(20, "log a command"); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span( "Verify that the media is has resumed playing forward at the default speedgarbage: not in length on purpose", 73); return UserPrompt(kIdentityAlpha, value); } - case 19: { - LogStep(19, "Reads the PlaybackSpeed attribute from the DUT"); + case 21: { + LogStep(21, "Reads the PlaybackSpeed attribute from the DUT"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::PlaybackSpeed::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Sends consecutive FastForward commands"); + case 22: { + LogStep(22, "Sends consecutive FastForward commands"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::FastForward::Type value; @@ -76557,8 +76887,8 @@ class Test_TC_MC_6_4Suite : public TestCommand ); } - case 21: { - LogStep(21, "Sends consecutive Rewind commands"); + case 23: { + LogStep(23, "Sends consecutive Rewind commands"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::MediaPlayback::Commands::Rewind::Type value; @@ -78303,7 +78633,7 @@ class Test_TC_MF_1_27Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0)); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; case 5: @@ -78314,7 +78644,7 @@ class Test_TC_MF_1_27Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0)); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; default: @@ -78440,7 +78770,7 @@ class Test_TC_MF_1_28Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0)); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; case 5: @@ -78451,7 +78781,7 @@ class Test_TC_MF_1_28Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0)); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; default: @@ -81120,10 +81450,10 @@ class Test_TC_SC_4_10Suite : public TestCommand } }; -class Test_TC_SWDIAG_1_2Suite : public TestCommand +class Test_TC_DGSW_1_1Suite : public TestCommand { public: - Test_TC_SWDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWDIAG_1_2", 0, credsIssuerConfig) + Test_TC_DGSW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81131,7 +81461,7 @@ class Test_TC_SWDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWDIAG_1_2Suite() {} + ~Test_TC_DGSW_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81176,10 +81506,10 @@ class Test_TC_SWDIAG_1_2Suite : public TestCommand } }; -class Test_TC_DGWIFI_1_1Suite : public TestCommand +class Test_TC_DGSW_3_1Suite : public TestCommand { public: - Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 0, credsIssuerConfig) + Test_TC_DGSW_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81187,7 +81517,7 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_1_1Suite() {} + ~Test_TC_DGSW_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81232,10 +81562,10 @@ class Test_TC_DGWIFI_1_1Suite : public TestCommand } }; -class Test_TC_DGWIFI_2_2Suite : public TestCommand +class Test_TC_DGSW_3_2Suite : public TestCommand { public: - Test_TC_DGWIFI_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_2_2", 0, credsIssuerConfig) + Test_TC_DGSW_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGSW_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81243,7 +81573,7 @@ class Test_TC_DGWIFI_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_2_2Suite() {} + ~Test_TC_DGSW_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81288,10 +81618,10 @@ class Test_TC_DGWIFI_2_2Suite : public TestCommand } }; -class Test_TC_DGWIFI_3_1Suite : public TestCommand +class Test_TC_DGWIFI_1_1Suite : public TestCommand { public: - Test_TC_DGWIFI_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_3_1", 0, credsIssuerConfig) + Test_TC_DGWIFI_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81299,7 +81629,7 @@ class Test_TC_DGWIFI_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_3_1Suite() {} + ~Test_TC_DGWIFI_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81344,10 +81674,10 @@ class Test_TC_DGWIFI_3_1Suite : public TestCommand } }; -class Test_TC_DGWIFI_3_2Suite : public TestCommand +class Test_TC_DGWIFI_2_2Suite : public TestCommand { public: - Test_TC_DGWIFI_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_3_2", 0, credsIssuerConfig) + Test_TC_DGWIFI_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81355,7 +81685,7 @@ class Test_TC_DGWIFI_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGWIFI_3_2Suite() {} + ~Test_TC_DGWIFI_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81400,10 +81730,10 @@ class Test_TC_DGWIFI_3_2Suite : public TestCommand } }; -class Test_TC_WNCV_6_1Suite : public TestCommand +class Test_TC_DGWIFI_3_1Suite : public TestCommand { public: - Test_TC_WNCV_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_6_1", 0, credsIssuerConfig) + Test_TC_DGWIFI_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81411,7 +81741,7 @@ class Test_TC_WNCV_6_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_WNCV_6_1Suite() {} + ~Test_TC_DGWIFI_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81456,10 +81786,10 @@ class Test_TC_WNCV_6_1Suite : public TestCommand } }; -class Test_TC_WNCV_7_1Suite : public TestCommand +class Test_TC_DGWIFI_3_2Suite : public TestCommand { public: - Test_TC_WNCV_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_7_1", 0, credsIssuerConfig) + Test_TC_DGWIFI_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DGWIFI_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81467,7 +81797,7 @@ class Test_TC_WNCV_7_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_WNCV_7_1Suite() {} + ~Test_TC_DGWIFI_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81512,10 +81842,10 @@ class Test_TC_WNCV_7_1Suite : public TestCommand } }; -class Test_TC_FLW_2_2Suite : public TestCommand +class Test_TC_WNCV_6_1Suite : public TestCommand { public: - Test_TC_FLW_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_2_2", 4, credsIssuerConfig) + Test_TC_WNCV_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_6_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81523,7 +81853,7 @@ class Test_TC_FLW_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLW_2_2Suite() {} + ~Test_TC_WNCV_6_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81536,8 +81866,6 @@ class Test_TC_FLW_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - chip::app::DataModel::Nullable ValueBeforeChange; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -81550,32 +81878,6 @@ class Test_TC_FLW_2_2Suite : 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::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - ValueBeforeChange = value; - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "", "uint16")); - VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -81591,41 +81893,15 @@ class Test_TC_FLW_2_2Suite : 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, "read the mandatory attribute: MeasuredValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "operate on DUT to change the flow significantly"); - VerifyOrDo(!ShouldSkip("MANUAL_FLOW_CHANGE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = - chip::Span("Operate on device to change the flow significantlygarbage: not in length on purpose", 50); - return Log(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "read the mandatory attribute: MeasuredValue"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, - FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } } return CHIP_NO_ERROR; } }; -class Test_TC_FLW_3_1Suite : public TestCommand +class Test_TC_WNCV_7_1Suite : public TestCommand { public: - Test_TC_FLW_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_3_1", 0, credsIssuerConfig) + Test_TC_WNCV_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_7_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81633,7 +81909,7 @@ class Test_TC_FLW_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_FLW_3_1Suite() {} + ~Test_TC_WNCV_7_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81678,10 +81954,10 @@ class Test_TC_FLW_3_1Suite : public TestCommand } }; -class Test_TC_OCC_2_2Suite : public TestCommand +class Test_TC_FLW_2_2Suite : public TestCommand { public: - Test_TC_OCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_2", 4, credsIssuerConfig) + Test_TC_FLW_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_2_2", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81689,7 +81965,7 @@ class Test_TC_OCC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OCC_2_2Suite() {} + ~Test_TC_FLW_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81702,7 +81978,7 @@ class Test_TC_OCC_2_2Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint8_t OccupancyValue; + chip::app::DataModel::Nullable ValueBeforeChange; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -81723,11 +81999,10 @@ class Test_TC_OCC_2_2Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("occupancy", value, 0)); - - OccupancyValue = value; + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + ValueBeforeChange = value; } break; case 2: @@ -81737,8 +82012,10 @@ class Test_TC_OCC_2_2Suite : public TestCommand case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "", "uint16")); + VerifyOrReturn(CheckConstraintNotValue("value", value, ValueBeforeChange)); } break; default: @@ -81764,35 +82041,33 @@ class Test_TC_OCC_2_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Reads Occupancy attribute from DUT"); - VerifyOrDo(!ShouldSkip("A_OCCUPANCY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, - true, chip::NullOptional); + LogStep(1, "read the mandatory attribute: MeasuredValue"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, + FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Operate on DUT to change the occupancy status"); - VerifyOrDo(!ShouldSkip("MANUAL_OCCUPANCY_CHANGE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(2, "operate on DUT to change the flow significantly"); + VerifyOrDo(!ShouldSkip("MANUAL_FLOW_CHANGE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + chip::app::Clusters::LogCommands::Commands::Log::Type value; value.message = - chip::Span("Operate on DUT to change the occupancy statusgarbage: not in length on purpose", 45); - return UserPrompt(kIdentityAlpha, value); + chip::Span("Operate on device to change the flow significantlygarbage: not in length on purpose", 50); + return Log(kIdentityAlpha, value); } case 3: { - LogStep(3, "Reads back Occupancy attribute from DUT after few seconds"); - VerifyOrDo(!ShouldSkip("A_OCCUPANCY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, - true, chip::NullOptional); + LogStep(3, "read the mandatory attribute: MeasuredValue"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, + FlowMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_OCC_2_3Suite : public TestCommand +class Test_TC_FLW_3_1Suite : public TestCommand { public: - Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 0, credsIssuerConfig) + Test_TC_FLW_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81800,7 +82075,7 @@ class Test_TC_OCC_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OCC_2_3Suite() {} + ~Test_TC_FLW_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81845,10 +82120,10 @@ class Test_TC_OCC_2_3Suite : public TestCommand } }; -class Test_TC_OCC_2_4Suite : public TestCommand +class Test_TC_OCC_2_2Suite : public TestCommand { public: - Test_TC_OCC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_4", 0, credsIssuerConfig) + Test_TC_OCC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_2", 4, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81856,7 +82131,7 @@ class Test_TC_OCC_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OCC_2_4Suite() {} + ~Test_TC_OCC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -81869,6 +82144,8 @@ class Test_TC_OCC_2_4Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint8_t OccupancyValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -81881,6 +82158,31 @@ class Test_TC_OCC_2_4Suite : 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)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("occupancy", value, 0U)); + + OccupancyValue = value; + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -81896,71 +82198,43 @@ class Test_TC_OCC_2_4Suite : 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); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OCC_3_1Suite : public TestCommand -{ -public: - Test_TC_OCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_OCC_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 1: { + LogStep(1, "Reads Occupancy attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OCCUPANCY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, + true, chip::NullOptional); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 2: { + LogStep(2, "Operate on DUT to change the occupancy status"); + VerifyOrDo(!ShouldSkip("MANUAL_OCCUPANCY_CHANGE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Operate on DUT to change the occupancy statusgarbage: not in length on purpose", 45); + return UserPrompt(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "Reads back Occupancy attribute from DUT after few seconds"); + VerifyOrDo(!ShouldSkip("A_OCCUPANCY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::Occupancy::Id, + true, chip::NullOptional); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { } return CHIP_NO_ERROR; } }; -class Test_TC_OCC_3_2Suite : public TestCommand +class Test_TC_OCC_2_3Suite : public TestCommand { public: - Test_TC_OCC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_3_2", 0, credsIssuerConfig) + Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -81968,7 +82242,7 @@ class Test_TC_OCC_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_OCC_3_2Suite() {} + ~Test_TC_OCC_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82013,10 +82287,10 @@ class Test_TC_OCC_3_2Suite : public TestCommand } }; -class Test_TC_PRS_2_2Suite : public TestCommand +class Test_TC_OCC_2_4Suite : public TestCommand { public: - Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_2", 0, credsIssuerConfig) + Test_TC_OCC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82024,7 +82298,7 @@ class Test_TC_PRS_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PRS_2_2Suite() {} + ~Test_TC_OCC_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82069,10 +82343,10 @@ class Test_TC_PRS_2_2Suite : public TestCommand } }; -class Test_TC_PRS_2_3Suite : public TestCommand +class Test_TC_OCC_3_1Suite : public TestCommand { public: - Test_TC_PRS_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_3", 0, credsIssuerConfig) + Test_TC_OCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82080,7 +82354,7 @@ class Test_TC_PRS_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PRS_2_3Suite() {} + ~Test_TC_OCC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82125,10 +82399,10 @@ class Test_TC_PRS_2_3Suite : public TestCommand } }; -class Test_TC_PRS_3_1Suite : public TestCommand +class Test_TC_OCC_3_2Suite : public TestCommand { public: - Test_TC_PRS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_3_1", 0, credsIssuerConfig) + Test_TC_OCC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82136,7 +82410,7 @@ class Test_TC_PRS_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PRS_3_1Suite() {} + ~Test_TC_OCC_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82181,10 +82455,10 @@ class Test_TC_PRS_3_1Suite : public TestCommand } }; -class Test_TC_PS_2_2Suite : public TestCommand +class Test_TC_PRS_2_2Suite : public TestCommand { public: - Test_TC_PS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_2_2", 0, credsIssuerConfig) + Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82192,7 +82466,7 @@ class Test_TC_PS_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PS_2_2Suite() {} + ~Test_TC_PRS_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82237,10 +82511,10 @@ class Test_TC_PS_2_2Suite : public TestCommand } }; -class Test_TC_PS_3_1Suite : public TestCommand +class Test_TC_PRS_2_3Suite : public TestCommand { public: - Test_TC_PS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_3_1", 0, credsIssuerConfig) + Test_TC_PRS_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82248,7 +82522,7 @@ class Test_TC_PS_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PS_3_1Suite() {} + ~Test_TC_PRS_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82293,10 +82567,10 @@ class Test_TC_PS_3_1Suite : public TestCommand } }; -class Test_TC_BOOL_2_2Suite : public TestCommand +class Test_TC_PRS_3_1Suite : public TestCommand { public: - Test_TC_BOOL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_2", 0, credsIssuerConfig) + Test_TC_PRS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82304,7 +82578,7 @@ class Test_TC_BOOL_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_2_2Suite() {} + ~Test_TC_PRS_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82349,10 +82623,10 @@ class Test_TC_BOOL_2_2Suite : public TestCommand } }; -class Test_TC_BOOL_3_1Suite : public TestCommand +class Test_TC_PS_2_2Suite : public TestCommand { public: - Test_TC_BOOL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_3_1", 0, credsIssuerConfig) + Test_TC_PS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82360,7 +82634,7 @@ class Test_TC_BOOL_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_3_1Suite() {} + ~Test_TC_PS_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82405,10 +82679,10 @@ class Test_TC_BOOL_3_1Suite : public TestCommand } }; -class Test_TC_CC_2_2Suite : public TestCommand +class Test_TC_PS_3_1Suite : public TestCommand { public: - Test_TC_CC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_2", 0, credsIssuerConfig) + Test_TC_PS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82416,7 +82690,7 @@ class Test_TC_CC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_2_2Suite() {} + ~Test_TC_PS_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82461,10 +82735,10 @@ class Test_TC_CC_2_2Suite : public TestCommand } }; -class Test_TC_CC_3_4Suite : public TestCommand +class Test_TC_BOOL_2_2Suite : public TestCommand { public: - Test_TC_CC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_4", 0, credsIssuerConfig) + Test_TC_BOOL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82472,7 +82746,7 @@ class Test_TC_CC_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_3_4Suite() {} + ~Test_TC_BOOL_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82517,10 +82791,10 @@ class Test_TC_CC_3_4Suite : public TestCommand } }; -class Test_TC_CC_4_5Suite : public TestCommand +class Test_TC_BOOL_3_1Suite : public TestCommand { public: - Test_TC_CC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_5", 0, credsIssuerConfig) + Test_TC_BOOL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82528,7 +82802,7 @@ class Test_TC_CC_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_4_5Suite() {} + ~Test_TC_BOOL_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82573,10 +82847,10 @@ class Test_TC_CC_4_5Suite : public TestCommand } }; -class Test_TC_CC_5_4Suite : public TestCommand +class Test_TC_CC_2_2Suite : public TestCommand { public: - Test_TC_CC_5_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_4", 0, credsIssuerConfig) + Test_TC_CC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82584,7 +82858,7 @@ class Test_TC_CC_5_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_5_4Suite() {} + ~Test_TC_CC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82629,10 +82903,10 @@ class Test_TC_CC_5_4Suite : public TestCommand } }; -class Test_TC_CC_6_4Suite : public TestCommand +class Test_TC_CC_3_4Suite : public TestCommand { public: - Test_TC_CC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_4", 0, credsIssuerConfig) + Test_TC_CC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82640,7 +82914,7 @@ class Test_TC_CC_6_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_6_4Suite() {} + ~Test_TC_CC_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82685,10 +82959,10 @@ class Test_TC_CC_6_4Suite : public TestCommand } }; -class Test_TC_CC_7_5Suite : public TestCommand +class Test_TC_CC_4_5Suite : public TestCommand { public: - Test_TC_CC_7_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_5", 0, credsIssuerConfig) + Test_TC_CC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82696,7 +82970,7 @@ class Test_TC_CC_7_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_7_5Suite() {} + ~Test_TC_CC_4_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82741,10 +83015,10 @@ class Test_TC_CC_7_5Suite : public TestCommand } }; -class Test_TC_CC_9_4Suite : public TestCommand +class Test_TC_CC_5_4Suite : public TestCommand { public: - Test_TC_CC_9_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_4", 0, credsIssuerConfig) + Test_TC_CC_5_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82752,7 +83026,7 @@ class Test_TC_CC_9_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_9_4Suite() {} + ~Test_TC_CC_5_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82797,10 +83071,10 @@ class Test_TC_CC_9_4Suite : public TestCommand } }; -class Test_TC_DL_1_1Suite : public TestCommand +class Test_TC_CC_6_4Suite : public TestCommand { public: - Test_TC_DL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_1_1", 0, credsIssuerConfig) + Test_TC_CC_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82808,7 +83082,7 @@ class Test_TC_DL_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_1_1Suite() {} + ~Test_TC_CC_6_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -82853,10 +83127,10 @@ class Test_TC_DL_1_1Suite : public TestCommand } }; -class Test_TC_DL_2_1Suite : public TestCommand +class Test_TC_CC_7_5Suite : public TestCommand { public: - Test_TC_DL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_1", 0, credsIssuerConfig) + Test_TC_CC_7_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -82864,7 +83138,175 @@ class Test_TC_DL_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DL_2_1Suite() {} + ~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_DL_1_1Suite : public TestCommand +{ +public: + Test_TC_DL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_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_DL_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_DL_2_1Suite : public TestCommand +{ +public: + Test_TC_DL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DL_2_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_DL_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -83077,10 +83519,178 @@ class Test_TC_DL_2_10Suite : public TestCommand } }; -class Test_TC_LC_2_3Suite : public TestCommand +class Test_TC_LCFG_1_1Suite : public TestCommand +{ +public: + Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_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_LCFG_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LCFG_2_1Suite : public TestCommand +{ +public: + Test_TC_LCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_2_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LCFG_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LCFG_3_1Suite : public TestCommand +{ +public: + Test_TC_LCFG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_LCFG_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_2_3Suite : public TestCommand { public: - Test_TC_LC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LC_2_3", 0, credsIssuerConfig) + Test_TC_LVL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -83088,7 +83698,7 @@ class Test_TC_LC_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LC_2_3Suite() {} + ~Test_TC_LVL_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -83133,10 +83743,10 @@ class Test_TC_LC_2_3Suite : public TestCommand } }; -class Test_TC_LC_2_4Suite : public TestCommand +class Test_TC_LVL_8_1Suite : public TestCommand { public: - Test_TC_LC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LC_2_4", 0, credsIssuerConfig) + Test_TC_LVL_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_8_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -83144,7 +83754,7 @@ class Test_TC_LC_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LC_2_4Suite() {} + ~Test_TC_LVL_8_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -83172,354 +83782,1838 @@ class Test_TC_LC_2_4Suite : public TestCommand default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_OO_2_3Suite : public TestCommand +{ +public: + Test_TC_OO_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_2_3", 132, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_OO_2_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(350)); } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mTimeout; + chip::Optional mEndpoint; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 0)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 0)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); + } + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 0)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); + } + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("globalSceneControl", value, 1)); + } + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); + } + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); + } + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 45: + 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 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); + } + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 55: + 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 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 195U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 205U)); + } + 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), 0)); + break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } + break; + case 61: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 62: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 63: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 64: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 65: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 66: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 67: + 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 68: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 69: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 70: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 71: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } + break; + case 72: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 73: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + } + break; + case 74: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 75: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 76: + 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 77: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 78: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + } + 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)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 1)); + } + break; + case 83: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 300U)); + } + break; + case 84: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); + } + break; + case 85: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 86: + 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 87: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 88: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + } + break; + case 89: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 90: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 91: + 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 92: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 93: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); + } + break; + case 94: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 95: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 96: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 97: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 98: + 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 99: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 195U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 205U)); + } + break; + case 100: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); + } + break; + case 101: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 102: + 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 103: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 104: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 105: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 106: + 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 107: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 108: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 195U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 205U)); + } + break; + case 109: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 110: + 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 111: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 112: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 0U)); + } + break; + case 113: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 114: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 115: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 116: + 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 117: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 118: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 119: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 120: + 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 121: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 122: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + } + break; + case 123: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 124: + 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 125: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 295U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 305U)); + } + break; + case 126: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("offWaitTime", value, 300U)); + } + break; + case 127: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 128: + 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 129: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onTime", value, 0U)); + } + break; + case 130: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); + } + break; + case 131: + 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, "1: Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "2a: Send On Command"); + VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } + case 2: { + LogStep(2, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "2b: Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "2b:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "3a:Sends OffWithEffect command to DUT"); + VerifyOrDo(!ShouldSkip("CR_OFFWITHEFFECT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; + value.effectId = static_cast(0); + value.effectVariant = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, + chip::NullOptional + + ); + } + case 6: { + LogStep(6, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "3b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 8: { + LogStep(8, "3b:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 9: { + LogStep(9, "4a:Sends OnWithRecallGlobalScene command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHRECALL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id, value, + chip::NullOptional + + ); + } + case 10: { + LogStep(10, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "4b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "4b:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 13: { + LogStep(13, "5a:Sends OffWithEffect command to DUT"); + VerifyOrDo(!ShouldSkip("CR_OFFWITHEFFECT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; + value.effectId = static_cast(0); + value.effectVariant = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, + chip::NullOptional + + ); + } + case 14: { + LogStep(14, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "5b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "5b:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "5c:Send On Command"); + VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } + case 18: { + LogStep(18, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "5d:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 20: { + LogStep(20, "5d:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 21: { + LogStep(21, "6a:Sends OffWithEffect command to DUT"); + VerifyOrDo(!ShouldSkip("CR_OFFWITHEFFECT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; + value.effectId = static_cast(1); + value.effectVariant = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, + chip::NullOptional + + ); + } + case 22: { + LogStep(22, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 23: { + LogStep(23, "6b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 24: { + LogStep(24, "6b:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 25: { + LogStep(25, "7a:Send On Command"); + VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } + case 26: { + LogStep(26, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 27: { + LogStep(27, "7b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "7b:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "7c:Sends OnWithRecallGlobalScene command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHRECALL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithRecallGlobalScene::Id, value, + chip::NullOptional + + ); + } + case 30: { + LogStep(30, "Wait 1000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 31: { + LogStep(31, "7d:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 32: { + LogStep(32, "7d:Reads GlobalSceneControl attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_GLOBALSCENECONTROL"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GlobalSceneControl::Id, true, + chip::NullOptional); + } + case 33: { + LogStep(33, "8:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 34: { + LogStep(34, "8:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 35: { + LogStep(35, "9a:Sends OnWithTimedOff command to DUT"); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 36: { + LogStep(36, "9b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 37: { + LogStep(37, "9b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 38: { + LogStep(38, "10a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 39: { + LogStep(39, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 40: { + LogStep(40, "10b:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 41: { + LogStep(41, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 42: { + LogStep(42, "10c:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 43: { + LogStep(43, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 44: { + LogStep(44, "10d:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 45: { + LogStep(45, "10e:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 46: { + LogStep(46, "10e:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 47: { + LogStep(47, "10e:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 48: { + LogStep(48, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 49: { + LogStep(49, "11a:Sends OffWithEffect command to DUT"); + VerifyOrDo(!ShouldSkip("CR_OFFWITHEFFECT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OffWithEffect::Type value; + value.effectId = static_cast(0); + value.effectVariant = static_cast(0); + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OffWithEffect::Id, value, + chip::NullOptional + + ); + } + case 50: { + LogStep(50, "11b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 51: { + LogStep(51, "11b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 52: { + LogStep(52, "11b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 53: { + LogStep(53, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 54: { + LogStep(54, "12a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 55: { + LogStep(55, "12b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 56: { + LogStep(56, "12b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 57: { + LogStep(57, "12b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 58: { + LogStep(58, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 59: { + LogStep(59, "13a:Send On Command"); + VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } + case 60: { + LogStep(60, "13b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 61: { + LogStep(61, "13b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 62: { + LogStep(62, "13b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 63: { + LogStep(63, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 64: { + LogStep(64, "14a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 65: { + LogStep(65, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 66: { + LogStep(66, "14b:Send Off Command"); + VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional + + ); + } + case 67: { + LogStep(67, "14c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 68: { + LogStep(68, "14c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 69: { + LogStep(69, "14c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 70: { + LogStep(70, "Wait 30000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 30000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 71: { + LogStep(71, "15:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 72: { + LogStep(72, "15:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 73: { + LogStep(73, "15:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 74: { + LogStep(74, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 75: { + LogStep(75, "16a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 76: { + LogStep(76, "16b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 77: { + LogStep(77, "16b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 78: { + LogStep(78, "16b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 79: { + LogStep(79, "17a:Send On Command"); + VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } + case 80: { + LogStep(80, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 81: { + LogStep(81, "17b:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional + + ); + } + case 82: { + LogStep(82, "17c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 83: { + LogStep(83, "17c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 84: { + LogStep(84, "17c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 85: { + LogStep(85, "Wait 40000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 86: { + LogStep(86, "17d:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 87: { + LogStep(87, "17d:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 88: { + LogStep(88, "17d:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 89: { + LogStep(89, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - } + case 90: { + LogStep(90, "18a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + ); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LC_2_5Suite : public TestCommand -{ -public: - Test_TC_LC_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LC_2_5", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LC_2_5Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 91: { + LogStep(91, "18b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 92: { + LogStep(92, "18b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + case 93: { + LogStep(93, "18b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_1_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_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_LCFG_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; + case 94: { + LogStep(94, "19a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + ); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 95: { + LogStep(95, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - } + case 96: { + LogStep(96, "19b:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(1U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + ); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_2_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_2_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 97: { + LogStep(97, "Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 98: { + LogStep(98, "19c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 99: { + LogStep(99, "19c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LCFG_3_1Suite : public TestCommand -{ -public: - Test_TC_LCFG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LCFG_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LCFG_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 100: { + LogStep(100, "19c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } + case 101: { + LogStep(101, "20a:Send Off Command"); + VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + case 102: { + LogStep(102, "20b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_2_3Suite : public TestCommand -{ -public: - Test_TC_LVL_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_2_3", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_2_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + case 103: { + LogStep(103, "20b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + case 104: { + LogStep(104, "20b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); } - } + case 105: { + LogStep(105, "21a:Sends OnWithimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + ); } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_LVL_8_1Suite : public TestCommand -{ -public: - Test_TC_LVL_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_8_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_LVL_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; } + case 106: { + LogStep(106, "21b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 107: { + LogStep(107, "21b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 108: { + LogStep(108, "21b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 109: { + LogStep(109, "22a:Send On Command"); + VerifyOrDo(!ShouldSkip("CR_ON"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - // - // Tests methods - // + ); + } + case 110: { + LogStep(110, "22b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 111: { + LogStep(111, "22b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 112: { + LogStep(112, "22b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 113: { + LogStep(113, ":Wait 10000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 114: { + LogStep(114, "23a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; + ); + } + case 115: { + LogStep(115, "23b:Send Off Command"); + VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + ); + } + case 116: { + LogStep(116, "23c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 117: { + LogStep(117, "23c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 118: { + LogStep(118, "23c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 119: { + LogStep(119, "Wait 40000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 120: { + LogStep(120, "23d:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } + case 121: { + LogStep(121, "23d:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 122: { + LogStep(122, "23d:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 123: { + LogStep(123, "24a:Sends OnWithTimedOff command to DUT"); + VerifyOrDo(!ShouldSkip("CR_ONWITHTIMEOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type value; + value.onOffControl = static_cast>(0U); + value.onTime = 300U; + value.offWaitTime = 300U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::OnWithTimedOff::Id, value, + chip::NullOptional - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); + ); } - } + case 124: { + LogStep(124, "24b:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 125: { + LogStep(125, "24b:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 126: { + LogStep(126, "24b:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 127: { + LogStep(127, "Wait 40000ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 40000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 128: { + LogStep(128, "24c:Reads OnOff attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONOFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 129: { + LogStep(129, "24c:Reads OnTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_ONTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnTime::Id, true, + chip::NullOptional); + } + case 130: { + LogStep(130, "24c:Reads OffWaitTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("A_OFFWAITTIME"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OffWaitTime::Id, true, + chip::NullOptional); + } + case 131: { + LogStep(131, "Send Off Command"); + VerifyOrDo(!ShouldSkip("CR_OFF"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { + ); + } } return CHIP_NO_ERROR; } @@ -85943,7 +88037,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), @@ -85974,6 +88067,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), @@ -86026,9 +88121,9 @@ 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), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -86264,7 +88359,9 @@ 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), @@ -86297,14 +88394,12 @@ 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), 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/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 6aaab0eb855f61..8df5eeab078aea 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -60,9 +60,6 @@ class TestList : public Command { printf("Test_TC_CC_7_3\n"); printf("Test_TC_CC_7_4\n"); printf("Test_TC_CC_8_1\n"); - printf("Test_TC_CC_9_1\n"); - printf("Test_TC_CC_9_2\n"); - printf("Test_TC_CC_9_3\n"); printf("Test_TC_DM_2_1\n"); printf("Test_TC_DESC_1_1\n"); printf("Test_TC_EMR_1_1\n"); @@ -134,7 +131,6 @@ class TestList : public Command { printf("Test_TC_OO_1_1\n"); printf("Test_TC_OO_2_1\n"); printf("Test_TC_OO_2_2\n"); - printf("Test_TC_OO_2_3\n"); printf("Test_TC_OO_2_4\n"); printf("Test_TC_PS_1_1\n"); printf("Test_TC_PS_2_1\n"); @@ -160,6 +156,8 @@ class TestList : public Command { printf("Test_TC_ULABEL_1_1\n"); printf("Test_TC_ULABEL_2_2\n"); printf("Test_TC_ULABEL_2_3\n"); + printf("Test_TC_ULABEL_2_4\n"); + printf("Test_TC_ULABEL_2_5\n"); printf("Test_TC_DGWIFI_2_1\n"); printf("Test_TC_DGWIFI_2_3\n"); printf("Test_TC_WNCV_1_1\n"); @@ -209,9 +207,9 @@ class TestList : public Command { printf("TestArmFailSafe\n"); printf("TestFanControl\n"); printf("TestMultiAdmin\n"); - printf("Test_TC_SWDIAG_1_1\n"); - printf("Test_TC_SWDIAG_2_1\n"); - printf("Test_TC_SWDIAG_3_1\n"); + printf("Test_TC_DGSW_2_1\n"); + printf("Test_TC_DGSW_2_2\n"); + printf("Test_TC_DGSW_2_3\n"); printf("TestSubscribe_OnOff\n"); printf("DL_UsersAndCredentials\n"); printf("DL_LockUnlock\n"); @@ -490,8 +488,8 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -512,11 +510,11 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:4ULL]; @@ -544,11 +542,11 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[2] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:12ULL]; @@ -576,7 +574,7 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -611,9 +609,9 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNonNull( @@ -678,11 +676,11 @@ class TestAccessControlCluster : public TestCommandBridge { .targets[2]) .deviceType)); VerifyOrReturn(CheckValue( - "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); VerifyOrReturn(CheckValueNonNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); VerifyOrReturn(CheckValue("Subjects", @@ -758,11 +756,11 @@ class TestAccessControlCluster : public TestCommandBridge { .targets[2]) .deviceType)); VerifyOrReturn(CheckValue( - "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1)); + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); VerifyOrReturn(CheckValueNonNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); VerifyOrReturn(CheckValue("Subjects", @@ -838,7 +836,7 @@ class TestAccessControlCluster : public TestCommandBridge { .targets[2]) .deviceType)); VerifyOrReturn(CheckValue( - "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1)); + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); } NextTest(); @@ -857,15 +855,15 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; @@ -874,7 +872,7 @@ class TestAccessControlCluster : public TestCommandBridge { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -908,25 +906,25 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(2))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); } NextTest(); @@ -945,18 +943,18 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -989,15 +987,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1016,18 +1014,18 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:1U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1060,15 +1058,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1087,22 +1085,22 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:0ULL]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; } ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1135,15 +1133,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1162,15 +1160,15 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -1181,7 +1179,7 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1214,15 +1212,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1241,15 +1239,15 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:1ULL]; @@ -1275,7 +1273,7 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = temp_3; } ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1308,15 +1306,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1335,15 +1333,15 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -1449,7 +1447,7 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1482,15 +1480,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -1509,8 +1507,8 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; @@ -1531,11 +1529,11 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:4ULL]; @@ -1563,11 +1561,11 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[2] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).authMode = [NSNumber numberWithUnsignedChar:3U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:12ULL]; @@ -1595,11 +1593,11 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[3] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).privilege = [NSNumber numberWithUnsignedChar:1]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).privilege = [NSNumber numberWithUnsignedChar:1U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).authMode = [NSNumber numberWithUnsignedChar:2U]; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; temp_3[0] = [NSNumber numberWithUnsignedLongLong:20ULL]; @@ -1627,7 +1625,7 @@ class TestAccessControlCluster : public TestCommandBridge { ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).targets = temp_3; } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[3]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1661,9 +1659,9 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(3))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNonNull( @@ -1728,11 +1726,11 @@ class TestAccessControlCluster : public TestCommandBridge { .targets[2]) .deviceType)); VerifyOrReturn(CheckValue( - "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).privilege, 1U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).authMode, 2U)); VerifyOrReturn(CheckValueNonNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).subjects)); VerifyOrReturn(CheckValue("Subjects", @@ -1808,11 +1806,11 @@ class TestAccessControlCluster : public TestCommandBridge { .targets[2]) .deviceType)); VerifyOrReturn(CheckValue( - "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1)); + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[1]).fabricIndex, 1U)); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).privilege, 3U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).authMode, 3U)); VerifyOrReturn(CheckValueNonNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).subjects)); VerifyOrReturn(CheckValue("Subjects", @@ -1888,7 +1886,7 @@ class TestAccessControlCluster : public TestCommandBridge { .targets[2]) .deviceType)); VerifyOrReturn(CheckValue( - "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1)); + "FabricIndex", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[2]).fabricIndex, 1U)); } NextTest(); @@ -1907,11 +1905,11 @@ class TestAccessControlCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = nil; ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; aclArgument = temp_0; } @@ -1945,15 +1943,15 @@ class TestAccessControlCluster : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("ACL", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue( - "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5)); + "Privilege", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).privilege, 5U)); VerifyOrReturn(CheckValue( - "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2)); + "AuthMode", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).authMode, 2U)); VerifyOrReturn(CheckValueNull( "Subjects", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).subjects)); VerifyOrReturn(CheckValueNull( "Targets", ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).targets)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1)); + ((CHIPAccessControlClusterAccessControlEntry *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -2606,7 +2604,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0)); + VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); } NextTest(); @@ -2629,8 +2627,8 @@ class Test_TC_BI_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("statusFlags", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("statusFlags", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("statusFlags", [value unsignedCharValue], 15)); + VerifyOrReturn(CheckConstraintMinValue("statusFlags", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("statusFlags", [value unsignedCharValue], 15U)); NextTest(); }]; @@ -2647,7 +2645,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id statusFlagsArgument; - statusFlagsArgument = [NSNumber numberWithUnsignedChar:0]; + statusFlagsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeStatusFlagsWithValue:statusFlagsArgument completionHandler:^(NSError * _Nullable err) { @@ -2675,7 +2673,7 @@ class Test_TC_BI_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0)); + VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); } NextTest(); @@ -2919,7 +2917,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0)); + VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); } NextTest(); @@ -2991,7 +2989,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0)); + VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); } NextTest(); @@ -3015,7 +3013,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0)); + VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); } NextTest(); @@ -3039,7 +3037,7 @@ class Test_TC_BI_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("status flags", actualValue, 0)); + VerifyOrReturn(CheckValue("status flags", actualValue, 0U)); } NextTest(); @@ -4021,26 +4019,50 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Validate constraints of attribute: CurrentHue\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeCurrentHue_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Validate constraints of attribute: CurrentSaturation\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeCurrentSaturation_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.A0003")) { + NextTest(); + return; + } err = TestReadsCurrentXAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Validate constraints of attribute: CurrentX\n"); + if (ShouldSkip("CC.S.A0003")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeCurrentX_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.A0004")) { + NextTest(); + return; + } err = TestReadsCurrentYAttributeFromDut_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Validate constraints of attribute: CurrentY\n"); + if (ShouldSkip("CC.S.A0004")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeCurrentY_6(); break; case 7: @@ -4053,6 +4075,10 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Validate constraints of attribute: ColorTemperatureMireds\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeColorTemperatureMireds_8(); break; case 9: @@ -4065,14 +4091,26 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Validate constraints of attribute: ColorMode\n"); + if (ShouldSkip("CC.S.A0008")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeColorMode_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Validate constraints of attribute: Options\n"); + if (ShouldSkip("CC.S.A000f")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeOptions_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Validate constraints of attribute: EnhancedCurrentHue\n"); + if (ShouldSkip("CC.S.A4000")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeEnhancedCurrentHue_12(); break; case 13: @@ -4085,187 +4123,375 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Validate constraints of attribute: ColorLoopActive\n"); + if (ShouldSkip("CC.S.A4002")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeColorLoopActive_14(); break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Validate constraints of attribute: ColorLoopDirection\n"); + if (ShouldSkip("CC.S.A4003")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeColorLoopDirection_15(); break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Validate constraints of attribute: ColorLoopTime\n"); + if (ShouldSkip("CC.S.A4004")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeColorLoopTime_16(); break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Validate constraints of attribute: ColorLoopStartEnhancedHue\n"); + if (ShouldSkip("CC.S.A4005")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeColorLoopStartEnhancedHue_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Validate constraints of attribute: ColorLoopStoredEnhancedHue\n"); + if (ShouldSkip("CC.S.A4006")) { + NextTest(); + return; + } err = TestValidateConstraintsOfAttributeColorLoopStoredEnhancedHue_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Reads ColorCapabilities attribute from DUT\n"); - err = TestReadsColorCapabilitiesAttributeFromDut_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Validate constraints of attribute: ColorCapabilities\n"); - err = TestValidateConstraintsOfAttributeColorCapabilities_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Reads ColorCapabilities attribute from DUT\n"); + if (ShouldSkip("CC.S.A400a")) { + NextTest(); + return; + } + err = TestReadsColorCapabilitiesAttributeFromDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reads ColorTempPhysicalMinMireds attribute from DUT\n"); - err = TestReadsColorTempPhysicalMinMiredsAttributeFromDut_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Validate constraints of attribute: ColorCapabilities\n"); + if (ShouldSkip("CC.S.A400a")) { + NextTest(); + return; + } + err = TestValidateConstraintsOfAttributeColorCapabilities_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Validate constraints of attribute: ColorTempPhysicalMinMireds\n"); - err = TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.A400b")) { + NextTest(); + return; + } + err = TestReadsColorTempPhysicalMinMiredsAttributeFromDut_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read ColorTempPhysicalMaxMireds attribute from DUT\n"); - err = TestReadColorTempPhysicalMaxMiredsAttributeFromDut_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : Validate constraints of attribute: ColorTempPhysicalMinMireds\n"); + if (ShouldSkip("CC.S.A400b")) { + NextTest(); + return; + } + err = TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Validate constraints of attribute: ColorTempPhysicalMaxMireds\n"); - err = TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Read ColorTempPhysicalMaxMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.A400c")) { + NextTest(); + return; + } + err = TestReadColorTempPhysicalMaxMiredsAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read the optional attribute: CoupleColorTempToLevelMinMireds\n"); - err = TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Validate constraints of attribute: ColorTempPhysicalMaxMireds\n"); + if (ShouldSkip("CC.S.A400c")) { + NextTest(); + return; + } + err = TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read the optional attribute: StartUpColorTemperatureMireds\n"); - err = TestReadTheOptionalAttributeStartUpColorTemperatureMireds_26(); + ChipLogProgress(chipTool, " ***** Test Step 26 : Read the optional attribute: CoupleColorTempToLevelMinMireds\n"); + if (ShouldSkip("CC.S.A400d")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Validate constraints of attribute: RemainingTime\n"); - err = TestValidateConstraintsOfAttributeRemainingTime_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : Read the optional attribute: StartUpColorTemperatureMireds\n"); + if (ShouldSkip("CC.S.A4010")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeStartUpColorTemperatureMireds_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read the optional attribute: DriftCompensation\n"); - err = TestReadTheOptionalAttributeDriftCompensation_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Validate constraints of attribute: RemainingTime\n"); + if (ShouldSkip("CC.S.A0002")) { + NextTest(); + return; + } + err = TestValidateConstraintsOfAttributeRemainingTime_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Read the optional attribute: CompensationText\n"); - err = TestReadTheOptionalAttributeCompensationText_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Read the optional attribute: DriftCompensation\n"); + if (ShouldSkip("CC.S.A0005")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeDriftCompensation_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read the mandatory attribute: NumberOfPrimaries\n"); - err = TestReadTheMandatoryAttributeNumberOfPrimaries_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Read the optional attribute: CompensationText\n"); + if (ShouldSkip("CC.S.A0005")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCompensationText_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read the mandatory attribute: Primary1X\n"); - err = TestReadTheMandatoryAttributePrimary1X_31(); + ChipLogProgress(chipTool, " ***** Test Step 31 : Read the mandatory attribute: NumberOfPrimaries\n"); + if (ShouldSkip("CC.S.A0010")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributeNumberOfPrimaries_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read the mandatory attribute: Primary1Y\n"); - err = TestReadTheMandatoryAttributePrimary1Y_32(); + ChipLogProgress(chipTool, " ***** Test Step 32 : Read the mandatory attribute: Primary1X\n"); + if (ShouldSkip("CC.S.A0011")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary1X_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read the mandatory attribute: Primary1Intensity\n"); - err = TestReadTheMandatoryAttributePrimary1Intensity_33(); + ChipLogProgress(chipTool, " ***** Test Step 33 : Read the mandatory attribute: Primary1Y\n"); + if (ShouldSkip("CC.S.A0012")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary1Y_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read the mandatory attribute: Primary2X\n"); - err = TestReadTheMandatoryAttributePrimary2X_34(); + ChipLogProgress(chipTool, " ***** Test Step 34 : Read the mandatory attribute: Primary1Intensity\n"); + if (ShouldSkip("CC.S.A0013")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary1Intensity_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read the mandatory attribute: Primary2Y\n"); - err = TestReadTheMandatoryAttributePrimary2Y_35(); + ChipLogProgress(chipTool, " ***** Test Step 35 : Read the mandatory attribute: Primary2X\n"); + if (ShouldSkip("CC.S.A0015")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary2X_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Validate constraints of attribute: Primary2Intensity\n"); - err = TestValidateConstraintsOfAttributePrimary2Intensity_36(); + ChipLogProgress(chipTool, " ***** Test Step 36 : Read the mandatory attribute: Primary2Y\n"); + if (ShouldSkip("CC.S.A0016")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary2Y_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read the mandatory attribute: Primary3X\n"); - err = TestReadTheMandatoryAttributePrimary3X_37(); + ChipLogProgress(chipTool, " ***** Test Step 37 : Validate constraints of attribute: Primary2Intensity\n"); + if (ShouldSkip("CC.S.A0017")) { + NextTest(); + return; + } + err = TestValidateConstraintsOfAttributePrimary2Intensity_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Read the mandatory attribute: Primary3Y\n"); - err = TestReadTheMandatoryAttributePrimary3Y_38(); + ChipLogProgress(chipTool, " ***** Test Step 38 : Read the mandatory attribute: Primary3X\n"); + if (ShouldSkip("CC.S.A0019")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary3X_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Read the mandatory attribute: Primary3Intensity\n"); - err = TestReadTheMandatoryAttributePrimary3Intensity_39(); + ChipLogProgress(chipTool, " ***** Test Step 39 : Read the mandatory attribute: Primary3Y\n"); + if (ShouldSkip("CC.S.A001a")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary3Y_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read the mandatory attribute: Primary4X\n"); - err = TestReadTheMandatoryAttributePrimary4X_40(); + ChipLogProgress(chipTool, " ***** Test Step 40 : Read the mandatory attribute: Primary3Intensity\n"); + if (ShouldSkip("CC.S.A001b")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary3Intensity_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read the mandatory attribute: Primary4Y\n"); - err = TestReadTheMandatoryAttributePrimary4Y_41(); + ChipLogProgress(chipTool, " ***** Test Step 41 : Read the mandatory attribute: Primary4X\n"); + if (ShouldSkip("CC.S.A0020")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary4X_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Read the mandatory attribute: Primary4Intensity\n"); - err = TestReadTheMandatoryAttributePrimary4Intensity_42(); + ChipLogProgress(chipTool, " ***** Test Step 42 : Read the mandatory attribute: Primary4Y\n"); + if (ShouldSkip("CC.S.A0021")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary4Y_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read the mandatory attribute: Primary5X\n"); - err = TestReadTheMandatoryAttributePrimary5X_43(); + ChipLogProgress(chipTool, " ***** Test Step 43 : Read the mandatory attribute: Primary4Intensity\n"); + if (ShouldSkip("CC.S.A0022")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary4Intensity_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Read the mandatory attribute: Primary5Y\n"); - err = TestReadTheMandatoryAttributePrimary5Y_44(); + ChipLogProgress(chipTool, " ***** Test Step 44 : Read the mandatory attribute: Primary5X\n"); + if (ShouldSkip("CC.S.A0024")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary5X_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read the mandatory attribute: Primary5Intensity\n"); - err = TestReadTheMandatoryAttributePrimary5Intensity_45(); + ChipLogProgress(chipTool, " ***** Test Step 45 : Read the mandatory attribute: Primary5Y\n"); + if (ShouldSkip("CC.S.A0025")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary5Y_45(); break; case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read the mandatory attribute: Primary6X\n"); - err = TestReadTheMandatoryAttributePrimary6X_46(); + ChipLogProgress(chipTool, " ***** Test Step 46 : Read the mandatory attribute: Primary5Intensity\n"); + if (ShouldSkip("CC.S.A0026")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary5Intensity_46(); break; case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Read the mandatory attribute: Primary6Y\n"); - err = TestReadTheMandatoryAttributePrimary6Y_47(); + ChipLogProgress(chipTool, " ***** Test Step 47 : Read the mandatory attribute: Primary6X\n"); + if (ShouldSkip("CC.S.A0028")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary6X_47(); break; case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Read the mandatory attribute: Primary6Intensity\n"); - err = TestReadTheMandatoryAttributePrimary6Intensity_48(); + ChipLogProgress(chipTool, " ***** Test Step 48 : Read the mandatory attribute: Primary6Y\n"); + if (ShouldSkip("CC.S.A0029")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary6Y_48(); break; case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read the optional attribute: WhitePointX\n"); - err = TestReadTheOptionalAttributeWhitePointX_49(); + ChipLogProgress(chipTool, " ***** Test Step 49 : Read the mandatory attribute: Primary6Intensity\n"); + if (ShouldSkip("CC.S.A002a")) { + NextTest(); + return; + } + err = TestReadTheMandatoryAttributePrimary6Intensity_49(); break; case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read the optional attribute: WhitePointY\n"); - err = TestReadTheOptionalAttributeWhitePointY_50(); + ChipLogProgress(chipTool, " ***** Test Step 50 : Read the optional attribute: WhitePointX\n"); + if (ShouldSkip("CC.S.A0030")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeWhitePointX_50(); break; case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Read the optional attribute: ColorPointRX\n"); - err = TestReadTheOptionalAttributeColorPointRX_51(); + ChipLogProgress(chipTool, " ***** Test Step 51 : Read the optional attribute: WhitePointY\n"); + if (ShouldSkip("CC.S.A0031")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeWhitePointY_51(); break; case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Read the optional attribute: ColorPointRY\n"); - err = TestReadTheOptionalAttributeColorPointRY_52(); + ChipLogProgress(chipTool, " ***** Test Step 52 : Read the optional attribute: ColorPointRX\n"); + if (ShouldSkip("CC.S.A0032")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointRX_52(); break; case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Read the optional attribute: ColorPointRIntensity\n"); - err = TestReadTheOptionalAttributeColorPointRIntensity_53(); + ChipLogProgress(chipTool, " ***** Test Step 53 : Read the optional attribute: ColorPointRY\n"); + if (ShouldSkip("CC.S.A0033")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointRY_53(); break; case 54: - ChipLogProgress(chipTool, " ***** Test Step 54 : Read the optional attribute: ColorPointGX\n"); - err = TestReadTheOptionalAttributeColorPointGX_54(); + ChipLogProgress(chipTool, " ***** Test Step 54 : Read the optional attribute: ColorPointRIntensity\n"); + if (ShouldSkip("CC.S.A0034")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointRIntensity_54(); break; case 55: - ChipLogProgress(chipTool, " ***** Test Step 55 : Read the optional attribute: ColorPointGY\n"); - err = TestReadTheOptionalAttributeColorPointGY_55(); + ChipLogProgress(chipTool, " ***** Test Step 55 : Read the optional attribute: ColorPointGX\n"); + if (ShouldSkip("CC.S.A0036")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointGX_55(); break; case 56: - ChipLogProgress(chipTool, " ***** Test Step 56 : Read the optional attribute: ColorPointGIntensity\n"); - err = TestReadTheOptionalAttributeColorPointGIntensity_56(); + ChipLogProgress(chipTool, " ***** Test Step 56 : Read the optional attribute: ColorPointGY\n"); + if (ShouldSkip("CC.S.A0037")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointGY_56(); break; case 57: - ChipLogProgress(chipTool, " ***** Test Step 57 : Read the optional attribute: ColorPointBX\n"); - err = TestReadTheOptionalAttributeColorPointBX_57(); + ChipLogProgress(chipTool, " ***** Test Step 57 : Read the optional attribute: ColorPointGIntensity\n"); + if (ShouldSkip("CC.S.A0038")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointGIntensity_57(); break; case 58: - ChipLogProgress(chipTool, " ***** Test Step 58 : Read the optional attribute: ColorPointBY\n"); - err = TestReadTheOptionalAttributeColorPointBY_58(); + ChipLogProgress(chipTool, " ***** Test Step 58 : Read the optional attribute: ColorPointBX\n"); + if (ShouldSkip("CC.S.A003a")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointBX_58(); break; case 59: - ChipLogProgress(chipTool, " ***** Test Step 59 : Read the optional attribute: ColorPointBIntensity\n"); - err = TestReadTheOptionalAttributeColorPointBIntensity_59(); + ChipLogProgress(chipTool, " ***** Test Step 59 : Read the optional attribute: ColorPointBY\n"); + if (ShouldSkip("CC.S.A003b")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointBY_59(); + break; + case 60: + ChipLogProgress(chipTool, " ***** Test Step 60 : Read the optional attribute: ColorPointBIntensity\n"); + if (ShouldSkip("CC.S.A003c")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorPointBIntensity_60(); break; } @@ -4458,6 +4684,9 @@ class Test_TC_CC_2_1 : public TestCommandBridge { case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -4471,7 +4700,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 60; + const uint16_t mTestCount = 61; chip::Optional mNodeId; chip::Optional mCluster; @@ -4498,7 +4727,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentHue", actualValue, 0U)); } VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); @@ -4521,7 +4750,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 0U)); } VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); @@ -4673,7 +4902,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ColorMode", actualValue, 1)); + VerifyOrReturn(CheckValue("ColorMode", actualValue, 1U)); } NextTest(); @@ -4694,8 +4923,8 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("colorMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2)); + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -4716,7 +4945,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("Options", actualValue, 0)); + VerifyOrReturn(CheckValue("Options", actualValue, 0U)); } VerifyOrReturn(CheckConstraintType("options", "", "map8")); @@ -4762,7 +4991,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedColorMode", actualValue, 1)); + VerifyOrReturn(CheckValue("EnhancedColorMode", actualValue, 1U)); } VerifyOrReturn(CheckConstraintType("enhancedColorMode", "", "enum8")); @@ -4785,7 +5014,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); + VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0U)); } VerifyOrReturn(CheckConstraintType("colorLoopActive", "", "uint8")); @@ -4808,7 +5037,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 0)); + VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 0U)); } VerifyOrReturn(CheckConstraintType("colorLoopDirection", "", "uint8")); @@ -4888,8 +5117,30 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull FeatureMapValue; + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_19() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestColorControl * cluster = [[CHIPTestColorControl 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + FeatureMapValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } - CHIP_ERROR TestReadsColorCapabilitiesAttributeFromDut_19() + CHIP_ERROR TestReadsColorCapabilitiesAttributeFromDut_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -4902,7 +5153,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ColorCapabilities", actualValue, 0U)); + VerifyOrReturn(CheckValue("ColorCapabilities", actualValue, FeatureMapValue)); } NextTest(); @@ -4911,7 +5162,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateConstraintsOfAttributeColorCapabilities_20() + CHIP_ERROR TestValidateConstraintsOfAttributeColorCapabilities_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -4932,7 +5183,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsColorTempPhysicalMinMiredsAttributeFromDut_21() + CHIP_ERROR TestReadsColorTempPhysicalMinMiredsAttributeFromDut_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -4955,7 +5206,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_22() + CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMinMireds_23() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -4977,7 +5228,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorTempPhysicalMaxMiredsAttributeFromDut_23() + CHIP_ERROR TestReadColorTempPhysicalMaxMiredsAttributeFromDut_24() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5000,7 +5251,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_24() + CHIP_ERROR TestValidateConstraintsOfAttributeColorTempPhysicalMaxMireds_25() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5022,7 +5273,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_25() + CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMireds_26() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5050,7 +5301,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMireds_26() + CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMireds_27() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5077,7 +5328,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateConstraintsOfAttributeRemainingTime_27() + CHIP_ERROR TestValidateConstraintsOfAttributeRemainingTime_28() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5105,7 +5356,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeDriftCompensation_28() + CHIP_ERROR TestReadTheOptionalAttributeDriftCompensation_29() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5122,8 +5373,8 @@ class Test_TC_CC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("driftCompensation", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("driftCompensation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", [value unsignedCharValue], 4)); + VerifyOrReturn(CheckConstraintMinValue("driftCompensation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("driftCompensation", [value unsignedCharValue], 4U)); NextTest(); }]; @@ -5131,7 +5382,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeCompensationText_29() + CHIP_ERROR TestReadTheOptionalAttributeCompensationText_30() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5155,7 +5406,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_30() + CHIP_ERROR TestReadTheMandatoryAttributeNumberOfPrimaries_31() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5169,8 +5420,8 @@ class Test_TC_CC_2_1 : public TestCommandBridge { if (value != nil) { VerifyOrReturn(CheckConstraintType("numberOfPrimaries", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", [value unsignedCharValue], 6)); + VerifyOrReturn(CheckConstraintMinValue("numberOfPrimaries", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfPrimaries", [value unsignedCharValue], 6U)); } NextTest(); @@ -5179,7 +5430,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_31() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1X_32() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5200,7 +5451,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_32() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1Y_33() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5221,7 +5472,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_33() + CHIP_ERROR TestReadTheMandatoryAttributePrimary1Intensity_34() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5243,7 +5494,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_34() + CHIP_ERROR TestReadTheMandatoryAttributePrimary2X_35() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5264,7 +5515,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_35() + CHIP_ERROR TestReadTheMandatoryAttributePrimary2Y_36() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5285,7 +5536,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_36() + CHIP_ERROR TestValidateConstraintsOfAttributePrimary2Intensity_37() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5307,7 +5558,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_37() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3X_38() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5328,7 +5579,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_38() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3Y_39() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5349,7 +5600,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_39() + CHIP_ERROR TestReadTheMandatoryAttributePrimary3Intensity_40() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5371,7 +5622,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_40() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4X_41() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5392,7 +5643,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_41() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4Y_42() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5413,7 +5664,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_42() + CHIP_ERROR TestReadTheMandatoryAttributePrimary4Intensity_43() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5435,7 +5686,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_43() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5X_44() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5456,7 +5707,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_44() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5Y_45() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5477,7 +5728,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_45() + CHIP_ERROR TestReadTheMandatoryAttributePrimary5Intensity_46() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5499,7 +5750,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_46() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6X_47() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5520,7 +5771,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_47() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6Y_48() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5541,7 +5792,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_48() + CHIP_ERROR TestReadTheMandatoryAttributePrimary6Intensity_49() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5563,7 +5814,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_49() + CHIP_ERROR TestReadTheOptionalAttributeWhitePointX_50() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5589,7 +5840,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_50() + CHIP_ERROR TestReadTheOptionalAttributeWhitePointY_51() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5615,7 +5866,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_51() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRX_52() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5641,7 +5892,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_52() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRY_53() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5667,7 +5918,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_53() + CHIP_ERROR TestReadTheOptionalAttributeColorPointRIntensity_54() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5694,7 +5945,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_54() + CHIP_ERROR TestReadTheOptionalAttributeColorPointGX_55() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5720,7 +5971,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_55() + CHIP_ERROR TestReadTheOptionalAttributeColorPointGY_56() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5746,7 +5997,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_56() + CHIP_ERROR TestReadTheOptionalAttributeColorPointGIntensity_57() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5773,7 +6024,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_57() + CHIP_ERROR TestReadTheOptionalAttributeColorPointBX_58() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5799,7 +6050,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_58() + CHIP_ERROR TestReadTheOptionalAttributeColorPointBY_59() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5825,7 +6076,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_59() + CHIP_ERROR TestReadTheOptionalAttributeColorPointBIntensity_60() { CHIPDevice * device = GetDevice("alpha"); CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -5905,10 +6156,18 @@ class Test_TC_CC_3_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestReadsCurrentHueAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Move to hue shortest distance command\n"); + if (ShouldSkip("CC.S.C00.Rsp")) { + NextTest(); + return; + } err = TestMoveToHueShortestDistanceCommand_4(); break; case 5: @@ -5918,6 +6177,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); break; case 7: @@ -5927,6 +6190,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8(); break; case 9: @@ -5936,10 +6203,18 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Move to hue longest distance command\n"); + if (ShouldSkip("CC.S.C00.Rsp")) { + NextTest(); + return; + } err = TestMoveToHueLongestDistanceCommand_11(); break; case 12: @@ -5949,6 +6224,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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: @@ -5958,6 +6237,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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: @@ -5967,10 +6250,18 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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 to hue up command\n"); + if (ShouldSkip("CC.S.C00.Rsp")) { + NextTest(); + return; + } err = TestMoveToHueUpCommand_18(); break; case 19: @@ -5980,6 +6271,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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: @@ -5989,6 +6284,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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: @@ -5998,10 +6297,18 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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 to hue down command\n"); + if (ShouldSkip("CC.S.C00.Rsp")) { + NextTest(); + return; + } err = TestMoveToHueDownCommand_25(); break; case 26: @@ -6011,6 +6318,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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: @@ -6020,6 +6331,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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: @@ -6029,6 +6344,10 @@ class Test_TC_CC_3_1 : public TestCommandBridge { 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: @@ -6230,8 +6549,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6246,11 +6565,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:150]; - params.direction = [NSNumber numberWithUnsignedChar:0]; + params.hue = [NSNumber numberWithUnsignedChar:150U]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -6282,8 +6601,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6310,8 +6629,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6338,8 +6657,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6354,11 +6673,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:200]; - params.direction = [NSNumber numberWithUnsignedChar:1]; + params.hue = [NSNumber numberWithUnsignedChar:200U]; + params.direction = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -6390,8 +6709,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6418,8 +6737,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6446,8 +6765,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6462,11 +6781,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:250]; - params.direction = [NSNumber numberWithUnsignedChar:2]; + params.hue = [NSNumber numberWithUnsignedChar:250U]; + params.direction = [NSNumber numberWithUnsignedChar:2U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -6498,8 +6817,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6526,8 +6845,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6554,8 +6873,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6570,11 +6889,11 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveToHueParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:225]; - params.direction = [NSNumber numberWithUnsignedChar:3]; + params.hue = [NSNumber numberWithUnsignedChar:225U]; + params.direction = [NSNumber numberWithUnsignedChar:3U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -6606,8 +6925,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6634,8 +6953,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6662,8 +6981,8 @@ class Test_TC_CC_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -6763,10 +7082,18 @@ class Test_TC_CC_3_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestReadsCurrentHueAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Move hue up command\n"); + if (ShouldSkip("CC.S.C01.Rsp")) { + NextTest(); + return; + } err = TestMoveHueUpCommand_4(); break; case 5: @@ -6776,6 +7103,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); break; case 7: @@ -6785,6 +7116,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8(); break; case 9: @@ -6794,10 +7129,18 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_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(); break; case 12: @@ -6807,6 +7150,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6816,6 +7163,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6825,10 +7176,18 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6838,6 +7197,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6847,6 +7210,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6856,10 +7223,18 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6869,6 +7244,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6878,6 +7257,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -6887,6 +7270,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { 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: @@ -7088,8 +7475,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7104,10 +7491,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:50]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -7139,8 +7526,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7167,8 +7554,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7195,8 +7582,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7211,10 +7598,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:50]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -7246,8 +7633,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7274,8 +7661,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7302,8 +7689,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7318,10 +7705,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3]; - params.rate = [NSNumber numberWithUnsignedChar:50]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -7353,8 +7740,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7381,8 +7768,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7409,8 +7796,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7425,10 +7812,10 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:50]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -7460,8 +7847,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7488,8 +7875,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7516,8 +7903,8 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7617,10 +8004,18 @@ class Test_TC_CC_3_3 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestReadsCurrentHueAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step hue up command\n"); + if (ShouldSkip("CC.S.C02.Rsp")) { + NextTest(); + return; + } err = TestStepHueUpCommand_4(); break; case 5: @@ -7629,10 +8024,18 @@ class Test_TC_CC_3_3 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestOverTransitionTimeReadCurrentHueAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step hue down command\n"); + if (ShouldSkip("CC.S.C02.Rsp")) { + NextTest(); + return; + } err = TestStepHueDownCommand_7(); break; case 8: @@ -7641,6 +8044,10 @@ class Test_TC_CC_3_3 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Read CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestOverTransitionTimeReadCurrentHueAttributeFromDut_9(); break; case 10: @@ -7776,8 +8183,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7792,11 +8199,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; - params.stepSize = [NSNumber numberWithUnsignedChar:5]; - params.transitionTime = [NSNumber numberWithUnsignedChar:25]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:5U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:25U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepHueWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Step hue up command Error: %@", err); @@ -7828,8 +8235,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7844,11 +8251,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3]; - params.stepSize = [NSNumber numberWithUnsignedChar:5]; - params.transitionTime = [NSNumber numberWithUnsignedChar:25]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = [NSNumber numberWithUnsignedChar:5U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:25U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepHueWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Step hue down command Error: %@", err); @@ -7880,8 +8287,8 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -7981,10 +8388,18 @@ class Test_TC_CC_4_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Check Saturation attribute value matched before any change\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } err = TestCheckSaturationAttributeValueMatchedBeforeAnyChange_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Move to saturation command\n"); + if (ShouldSkip("CC.S.C03.Rsp")) { + NextTest(); + return; + } err = TestMoveToSaturationCommand_4(); break; case 5: @@ -7994,6 +8409,10 @@ class Test_TC_CC_4_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6(); break; case 7: @@ -8003,6 +8422,10 @@ class Test_TC_CC_4_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8(); break; case 9: @@ -8012,6 +8435,10 @@ class Test_TC_CC_4_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10(); break; case 11: @@ -8150,8 +8577,8 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8166,10 +8593,10 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveToSaturationParams alloc] init]; - params.saturation = [NSNumber numberWithUnsignedChar:90]; + params.saturation = [NSNumber numberWithUnsignedChar:90U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToSaturationWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Move to saturation command Error: %@", err); @@ -8201,8 +8628,8 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8229,8 +8656,8 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8257,8 +8684,8 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8359,10 +8786,18 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Move saturation up command\n"); + if (ShouldSkip("CC.S.C04.Rsp")) { + NextTest(); + return; + } err = TestMoveSaturationUpCommand_4(); break; case 5: @@ -8372,6 +8807,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_6(); break; case 7: @@ -8381,6 +8820,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8(); break; case 9: @@ -8390,10 +8833,18 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_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(); break; case 12: @@ -8403,6 +8854,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8412,6 +8867,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8421,10 +8880,18 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8434,6 +8901,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8443,6 +8914,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8452,10 +8927,18 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8465,6 +8948,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8474,6 +8961,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8483,10 +8974,18 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8496,6 +8995,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8505,6 +9008,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8514,10 +9021,18 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8527,6 +9042,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8536,6 +9055,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8545,6 +9068,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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: @@ -8788,8 +9315,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8804,10 +9331,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:5]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -8839,8 +9366,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8867,8 +9394,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8895,8 +9422,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8911,10 +9438,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3]; - params.rate = [NSNumber numberWithUnsignedChar:5]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -8946,8 +9473,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -8974,8 +9501,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9002,8 +9529,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9018,10 +9545,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:5]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -9053,8 +9580,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9081,8 +9608,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9109,8 +9636,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9125,10 +9652,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:5]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -9160,8 +9687,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9188,8 +9715,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9216,8 +9743,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9232,10 +9759,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3]; - params.rate = [NSNumber numberWithUnsignedChar:5]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -9267,8 +9794,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9295,8 +9822,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9323,8 +9850,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9339,10 +9866,10 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:5]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -9374,8 +9901,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9402,8 +9929,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9430,8 +9957,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9531,10 +10058,18 @@ class Test_TC_CC_4_3 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } err = TestReadsCurrentSaturationAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step saturation up command\n"); + if (ShouldSkip("CC.S.C05.Rsp")) { + NextTest(); + return; + } err = TestStepSaturationUpCommand_4(); break; case 5: @@ -9543,10 +10078,18 @@ class Test_TC_CC_4_3 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Over TransitionTime,Read CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } err = TestOverTransitionTimeReadCurrentSaturationAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : Step saturation down command\n"); + if (ShouldSkip("CC.S.C05.Rsp")) { + NextTest(); + return; + } err = TestStepSaturationDownCommand_7(); break; case 8: @@ -9555,6 +10098,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } err = TestOverTransitionTimeReadsCurrentSaturationAttributeFromDut_9(); break; case 10: @@ -9690,8 +10237,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9706,11 +10253,11 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStepSaturationParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; - params.stepSize = [NSNumber numberWithUnsignedChar:15]; - params.transitionTime = [NSNumber numberWithUnsignedChar:10]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -9742,8 +10289,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9758,11 +10305,11 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStepSaturationParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3]; - params.stepSize = [NSNumber numberWithUnsignedChar:20]; - params.transitionTime = [NSNumber numberWithUnsignedChar:10]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = [NSNumber numberWithUnsignedChar:20U]; + 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 down command Error: %@", err); @@ -9794,8 +10341,8 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -9895,14 +10442,26 @@ class Test_TC_CC_4_4 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Check current hue attribute value matched before any change\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedBeforeAnyChange_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Check Saturation attribute value matched before any change\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } err = TestCheckSaturationAttributeValueMatchedBeforeAnyChange_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Move To current hue and saturation command\n"); + if (ShouldSkip("CC.S.C06.Rsp")) { + NextTest(); + return; + } err = TestMoveToCurrentHueAndSaturationCommand_5(); break; case 6: @@ -9912,11 +10471,19 @@ class Test_TC_CC_4_4 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_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")) { + NextTest(); + return; + } err = TestCheckCurrentSaturationAttributeValueMatchedTheValueSentByTheLastCommand_8(); break; case 9: @@ -10049,8 +10616,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -10070,8 +10637,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -10086,11 +10653,11 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.hue = [NSNumber numberWithUnsignedChar:40]; - params.saturation = [NSNumber numberWithUnsignedChar:160]; + params.hue = [NSNumber numberWithUnsignedChar:40U]; + params.saturation = [NSNumber numberWithUnsignedChar:160U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -10122,8 +10689,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -10143,8 +10710,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -10244,14 +10811,26 @@ class Test_TC_CC_5_1 : public TestCommandBridge { 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 : Move to Color command\n"); + if (ShouldSkip("CC.S.C07.Rsp")) { + NextTest(); + return; + } err = TestMoveToColorCommand_5(); break; case 6: @@ -10261,11 +10840,19 @@ class Test_TC_CC_5_1 : public TestCommandBridge { 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: @@ -10438,8 +11025,8 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.colorX = [NSNumber numberWithUnsignedShort:200U]; params.colorY = [NSNumber numberWithUnsignedShort:300U]; params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Move to Color command Error: %@", err); @@ -10593,14 +11180,26 @@ class Test_TC_CC_5_2 : public TestCommandBridge { 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 : Move Color command\n"); + if (ShouldSkip("CC.S.C08.Rsp")) { + NextTest(); + return; + } err = TestMoveColorCommand_5(); break; case 6: @@ -10610,25 +11209,45 @@ class Test_TC_CC_5_2 : public TestCommandBridge { 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 : Stop Move Step command\n"); + if (ShouldSkip("CC.S.C47.Rsp")) { + NextTest(); + return; + } err = TestStopMoveStepCommand_9(); 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")) { + NextTest(); + return; + } err = TestCheckCurrentXAttributeValueMatchedTheValueSentByTheLastCommand_10(); 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")) { + NextTest(); + return; + } err = TestCheckCurrentYAttributeValueMatchedTheValueSentByTheLastCommand_11(); break; case 12: @@ -10809,8 +11428,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterMoveColorParams alloc] init]; params.rateX = [NSNumber numberWithShort:15]; params.rateY = [NSNumber numberWithShort:20]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Move Color command Error: %@", err); @@ -10879,8 +11498,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Move Step command Error: %@", err); @@ -11027,14 +11646,26 @@ class Test_TC_CC_5_3 : public TestCommandBridge { 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: @@ -11044,11 +11675,19 @@ class Test_TC_CC_5_3 : public TestCommandBridge { 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: @@ -11221,8 +11860,8 @@ class Test_TC_CC_5_3 : public TestCommandBridge { params.stepX = [NSNumber numberWithShort:15]; params.stepY = [NSNumber numberWithShort:20]; params.transitionTime = [NSNumber numberWithUnsignedShort:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepColorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Step Color command Error: %@", err); @@ -11376,10 +12015,18 @@ class Test_TC_CC_6_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read current color temprature\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTemprature_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Move To Color Temperature command\n"); + if (ShouldSkip("CC.S.C0A.Rsp")) { + NextTest(); + return; + } err = TestMoveToColorTemperatureCommand_4(); break; case 5: @@ -11388,6 +12035,10 @@ class Test_TC_CC_6_1 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read current color temprature\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTemprature_6(); break; case 7: @@ -11532,8 +12183,8 @@ class Test_TC_CC_6_1 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterMoveToColorTemperatureParams alloc] init]; params.colorTemperature = [NSNumber numberWithUnsignedShort:100U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -11666,10 +12317,18 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read current color temprature\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTemprature_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Move up color temperature command\n"); + if (ShouldSkip("CC.S.C4B.Rsp")) { + NextTest(); + return; + } err = TestMoveUpColorTemperatureCommand_4(); break; case 5: @@ -11678,6 +12337,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_6(); break; case 7: @@ -11686,6 +12349,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8(); break; case 9: @@ -11694,10 +12361,18 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Move down color temperature command\n"); + if (ShouldSkip("CC.S.C4B.Rsp")) { + NextTest(); + return; + } err = TestMoveDownColorTemperatureCommand_11(); break; case 12: @@ -11706,6 +12381,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13(); break; case 14: @@ -11714,6 +12393,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15(); break; case 16: @@ -11722,14 +12405,26 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17(); break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Move up color temperature command\n"); + if (ShouldSkip("CC.S.C4B.Rsp")) { + NextTest(); + return; + } err = TestMoveUpColorTemperatureCommand_18(); break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Stop Color Temperature command\n"); + if (ShouldSkip("CC.S.C4B.Rsp")) { + NextTest(); + return; + } err = TestStopColorTemperatureCommand_19(); break; case 20: @@ -11738,6 +12433,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_21(); break; case 22: @@ -11746,6 +12445,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 23: ChipLogProgress(chipTool, " ***** Test Step 23 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23(); break; case 24: @@ -11754,14 +12457,26 @@ class Test_TC_CC_6_2 : public TestCommandBridge { break; case 25: ChipLogProgress(chipTool, " ***** Test Step 25 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25(); break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : Move down color temperature command\n"); + if (ShouldSkip("CC.S.C4B.Rsp")) { + NextTest(); + return; + } err = TestMoveDownColorTemperatureCommand_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(); break; case 28: @@ -11770,6 +12485,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { 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: @@ -11778,6 +12497,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { 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: @@ -11786,6 +12509,10 @@ class Test_TC_CC_6_2 : public TestCommandBridge { 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: @@ -12009,12 +12736,12 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedShort:10U]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -12118,12 +12845,12 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; params.rate = [NSNumber numberWithUnsignedShort:20U]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -12227,12 +12954,12 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedShort:10U]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -12252,12 +12979,12 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedShort:10U]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorTemperatureWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Color Temperature command Error: %@", err); @@ -12361,12 +13088,12 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; params.rate = [NSNumber numberWithUnsignedShort:20U]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -12386,12 +13113,12 @@ class Test_TC_CC_6_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedShort:10U]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorTemperatureWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Color Temperature command Error: %@", err); @@ -12580,10 +13307,18 @@ class Test_TC_CC_6_3 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read current color temprature\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTemprature_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Step up color temperature command\n"); + if (ShouldSkip("CC.S.C4C.Rsp")) { + NextTest(); + return; + } err = TestStepUpColorTemperatureCommand_4(); break; case 5: @@ -12592,6 +13327,10 @@ class Test_TC_CC_6_3 : public TestCommandBridge { break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read current color temprature\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTemprature_6(); break; case 7: @@ -12600,6 +13339,10 @@ class Test_TC_CC_6_3 : public TestCommandBridge { break; case 8: ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTemprature_8(); break; case 9: @@ -12608,10 +13351,18 @@ class Test_TC_CC_6_3 : public TestCommandBridge { break; case 10: ChipLogProgress(chipTool, " ***** Test Step 10 : Read current color temprature\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } err = TestReadCurrentColorTemprature_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(); break; case 12: @@ -12620,6 +13371,10 @@ class Test_TC_CC_6_3 : public TestCommandBridge { 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: @@ -12628,6 +13383,10 @@ class Test_TC_CC_6_3 : public TestCommandBridge { 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: @@ -12636,6 +13395,10 @@ class Test_TC_CC_6_3 : public TestCommandBridge { 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: @@ -12811,13 +13574,13 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStepColorTemperatureParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; + 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:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepColorTemperatureWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Step up color temperature command Error: %@", err); @@ -12921,13 +13684,13 @@ class Test_TC_CC_6_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStepColorTemperatureParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3]; + 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]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -13116,15 +13879,27 @@ class Test_TC_CC_7_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Enhanced Move To Hue command\n"); + if (ShouldSkip("CC.S.C40.Rsp")) { + NextTest(); + return; + } err = TestEnhancedMoveToHueCommand_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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Enhanced Move To Hue command\n"); + if (ShouldSkip("CC.S.C40.Rsp")) { + NextTest(); + return; + } err = TestEnhancedMoveToHueCommand_5(); break; case 6: @@ -13134,6 +13909,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7(); break; case 8: @@ -13143,6 +13922,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13152,10 +13935,18 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13165,6 +13956,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13174,6 +13969,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13183,10 +13982,18 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13196,6 +14003,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13205,6 +14016,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13214,10 +14029,18 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13227,6 +14050,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13236,6 +14063,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13245,6 +14076,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { 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: @@ -13445,10 +14280,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterEnhancedMoveToHueParams alloc] init]; params.enhancedHue = [NSNumber numberWithUnsignedShort:1025U]; - params.direction = [NSNumber numberWithUnsignedChar:0]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -13490,10 +14325,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterEnhancedMoveToHueParams alloc] init]; params.enhancedHue = [NSNumber numberWithUnsignedShort:1100U]; - params.direction = [NSNumber numberWithUnsignedChar:0]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -13598,10 +14433,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterEnhancedMoveToHueParams alloc] init]; params.enhancedHue = [NSNumber numberWithUnsignedShort:1150U]; - params.direction = [NSNumber numberWithUnsignedChar:1]; + params.direction = [NSNumber numberWithUnsignedChar:1U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -13706,10 +14541,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterEnhancedMoveToHueParams alloc] init]; params.enhancedHue = [NSNumber numberWithUnsignedShort:1200U]; - params.direction = [NSNumber numberWithUnsignedChar:2]; + params.direction = [NSNumber numberWithUnsignedChar:2U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -13814,10 +14649,10 @@ class Test_TC_CC_7_1 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterEnhancedMoveToHueParams alloc] init]; params.enhancedHue = [NSNumber numberWithUnsignedShort:1300U]; - params.direction = [NSNumber numberWithUnsignedChar:3]; + params.direction = [NSNumber numberWithUnsignedChar:3U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -14006,10 +14841,18 @@ class Test_TC_CC_7_2 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Check EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeFromDut_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Enhanced Move Hue Up command\n"); + if (ShouldSkip("CC.S.C41.Rsp")) { + NextTest(); + return; + } err = TestEnhancedMoveHueUpCommand_4(); break; case 5: @@ -14019,6 +14862,10 @@ class Test_TC_CC_7_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); break; case 7: @@ -14028,6 +14875,10 @@ class Test_TC_CC_7_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_8(); break; case 9: @@ -14037,19 +14888,35 @@ class Test_TC_CC_7_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Enhanced Move Hue Stop command\n"); + if (ShouldSkip("CC.S.C41.Rsp")) { + NextTest(); + return; + } err = TestEnhancedMoveHueStopCommand_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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Enhanced Move Hue Down command \n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Enhanced Move Hue Down command\n"); + if (ShouldSkip("CC.S.C41.Rsp")) { + NextTest(); + return; + } err = TestEnhancedMoveHueDownCommand_13(); break; case 14: @@ -14059,6 +14926,10 @@ class Test_TC_CC_7_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_15(); break; case 16: @@ -14068,6 +14939,10 @@ class Test_TC_CC_7_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_17(); break; case 18: @@ -14077,15 +14952,27 @@ class Test_TC_CC_7_2 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_19(); break; case 20: ChipLogProgress(chipTool, " ***** Test Step 20 : Enhanced Move Hue Stop command\n"); + if (ShouldSkip("CC.S.C41.Rsp")) { + NextTest(); + return; + } err = TestEnhancedMoveHueStopCommand_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: @@ -14273,10 +15160,10 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedShort:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -14380,10 +15267,10 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -14424,13 +15311,13 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; params.rate = [NSNumber numberWithUnsignedShort:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); + NSLog(@"Enhanced Move Hue Down command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14531,10 +15418,10 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; params.rate = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -14660,10 +15547,18 @@ class Test_TC_CC_7_3 : public TestCommandBridge { 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: @@ -14672,10 +15567,18 @@ class Test_TC_CC_7_3 : public TestCommandBridge { 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: @@ -14684,6 +15587,10 @@ class Test_TC_CC_7_3 : public TestCommandBridge { break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000")) { + NextTest(); + return; + } err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_9(); break; case 10: @@ -14835,11 +15742,11 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterEnhancedStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; params.stepSize = [NSNumber numberWithUnsignedShort:50U]; params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -14887,11 +15794,11 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterEnhancedStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; params.stepSize = [NSNumber numberWithUnsignedShort:75U]; params.transitionTime = [NSNumber numberWithUnsignedShort:1U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster enhancedStepHueWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Enhanced Step Hue Down command Error: %@", err); @@ -15024,10 +15931,18 @@ class Test_TC_CC_7_4 : public TestCommandBridge { 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 move to hue and saturation command\n"); + if (ShouldSkip("CC.S.C43.Rsp")) { + NextTest(); + return; + } err = TestEnhancedMoveToHueAndSaturationCommand_4(); break; case 5: @@ -15037,6 +15952,10 @@ class Test_TC_CC_7_4 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_6(); break; case 7: @@ -15180,10 +16099,10 @@ class Test_TC_CC_7_4 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; params.enhancedHue = [NSNumber numberWithUnsignedShort:1200U]; - params.saturation = [NSNumber numberWithUnsignedChar:90]; + params.saturation = [NSNumber numberWithUnsignedChar:90U]; params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -15316,18 +16235,34 @@ class Test_TC_CC_8_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Move hue up command\n"); + if (ShouldSkip("CC.S.C01.Rsp")) { + NextTest(); + return; + } err = TestMoveHueUpCommand_3(); break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestReadsCurrentHueAttributeFromDut_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Stop Move Step command\n"); + if (ShouldSkip("CC.S.C47.Rsp")) { + NextTest(); + return; + } err = TestStopMoveStepCommand_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } err = TestReadsCurrentHueAttributeFromDut_6(); break; case 7: @@ -15337,23 +16272,43 @@ class Test_TC_CC_8_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestCheckCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_8(); break; case 9: ChipLogProgress(chipTool, " ***** Test Step 9 : Move saturation up command\n"); + if (ShouldSkip("CC.S.C04.Rsp")) { + NextTest(); + return; + } err = TestMoveSaturationUpCommand_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")) { + NextTest(); + return; + } err = TestCheckSaturationAttributeValueMatchedTheValueSentByTheLastCommand_10(); break; case 11: ChipLogProgress(chipTool, " ***** Test Step 11 : Stop Move Step command\n"); + if (ShouldSkip("CC.S.C47.Rsp")) { + NextTest(); + return; + } err = TestStopMoveStepCommand_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Reads CurrentSaturation attribute from DUT.\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } err = TestReadsCurrentSaturationAttributeFromDut_12(); break; case 13: @@ -15363,30 +16318,58 @@ class Test_TC_CC_8_1 : public TestCommandBridge { 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: @@ -15396,27 +16379,51 @@ class Test_TC_CC_8_1 : public TestCommandBridge { 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")) { + NextTest(); + return; + } err = TestReadsCurrentColorTempratureFromDut_27(); break; case 28: @@ -15426,22 +16433,42 @@ class Test_TC_CC_8_1 : public TestCommandBridge { case 29: 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")) { + NextTest(); + return; + } err = TestStopMoveStepCommand_32(); break; case 33: ChipLogProgress(chipTool, " ***** Test Step 33 : Reads EnhancedCurrentHue attribute value from DUT\n"); + if (ShouldSkip("CC.S.A4000")) { + NextTest(); + return; + } err = TestReadsEnhancedCurrentHueAttributeValueFromDut_33(); break; case 34: @@ -15451,6 +16478,10 @@ class Test_TC_CC_8_1 : public TestCommandBridge { case 35: ChipLogProgress(chipTool, " ***** Test Step 35 : Check EnhancedCurrentHue attribute value matched the value sent by the last attribute\n"); + if (ShouldSkip("CC.S.A4000")) { + NextTest(); + return; + } err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastAttribute_35(); break; case 36: @@ -15659,10 +16690,10 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:50]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -15687,8 +16718,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -15703,8 +16734,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Move Step command Error: %@", err); @@ -15729,8 +16760,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -15757,8 +16788,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHue", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -15773,10 +16804,10 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:5]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -15801,8 +16832,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -15817,8 +16848,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Move Step command Error: %@", err); @@ -15843,8 +16874,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -15871,8 +16902,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentSaturation", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -15889,8 +16920,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { __auto_type * params = [[CHIPColorControlClusterMoveColorParams alloc] init]; params.rateX = [NSNumber numberWithShort:15]; params.rateY = [NSNumber numberWithShort:20]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveColorWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Move Color command Error: %@", err); @@ -15952,8 +16983,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Move Step command Error: %@", err); @@ -16064,12 +17095,12 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedShort:10U]; params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:1U]; params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:255U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -16110,8 +17141,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Move Step command Error: %@", err); @@ -16180,10 +17211,10 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; params.rate = [NSNumber numberWithUnsignedShort:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + 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); @@ -16224,8 +17255,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stopMoveStepWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Stop Move Step command Error: %@", err); @@ -16327,11 +17358,11 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } }; -class Test_TC_CC_9_1 : public TestCommandBridge { +class Test_TC_DM_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_9_1() - : TestCommandBridge("Test_TC_CC_9_1") + Test_TC_DM_2_1() + : TestCommandBridge("Test_TC_DM_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -16341,7 +17372,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_9_1() {} + ~Test_TC_DM_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -16349,11 +17380,11 @@ class Test_TC_CC_9_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -16370,408 +17401,97 @@ class Test_TC_CC_9_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition : Turn on light for color control tests\n"); - err = TestPreconditionTurnOnLightForColorControlTests_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Query Data Model Revision\n"); + err = TestQueryDataModelRevision_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 : Query Vendor Name\n"); + err = TestQueryVendorName_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Query VendorID\n"); + err = TestQueryVendorID_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Query Product Name\n"); + err = TestQueryProductName_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Query ProductID\n"); + err = TestQueryProductID_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Query Node Label\n"); + err = TestQueryNodeLabel_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Query User Location\n"); + err = TestQueryUserLocation_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read ColorLoopTime attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPTIME")) { - NextTest(); - return; - } - err = TestReadColorLoopTimeAttributeFromDut_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Query HardwareVersion\n"); + err = TestQueryHardwareVersion_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Query HardwareVersionString\n"); + err = TestQueryHardwareVersionString_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read ColorLoopStartEnhancedHue attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) { + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH reads SoftwareVersionString from the DUT and Verify it is of type string and verify the " + "format\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadColorLoopStartEnhancedHueAttributeFromDut_10(); + err = TestThReadsSoftwareVersionStringFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH reads ManufacturingDate from the DUT and Verify it is of type string and verify the " + "format\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestSendsColorLoopSetCommandSetAllAttributes_11(); + err = TestThReadsManufacturingDateFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : Query PartNumber\n"); + if (ShouldSkip("PART_NUM")) { NextTest(); return; } - err = TestReadColorLoopActiveAttributeFromDut_12(); + err = TestQueryPartNumber_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH reads ProductURL from the DUT and Verify it is of type string and verify the format\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadEnhancedCurrentHueAttributeFromDut_13(); + err = TestThReadsProductURLFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Query ProductLabel\n"); + err = TestQueryProductLabel_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Query SerialNumber\n"); + err = TestQuerySerialNumber_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : Query LocalConfigDisabled\n"); + err = TestQueryLocalConfigDisabled_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Query Reachable\n"); + err = TestQueryReachable_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read ColorLoopStoredEnhancedHue attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Enhanced Move To Hue command\n"); - if (ShouldSkip("CR_ENHANCEDMOVETOHUE")) { - NextTest(); - return; - } - err = TestEnhancedMoveToHueCommand_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 2000ms\n"); - err = TestWait2000ms_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Read ColorLoopStoredEnhancedHue attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Read ColorLoopDirection attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_46(); - break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Read ColorLoopStoredEnhancedHue attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_47(); - break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_48(); - break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_49(); - break; - case 50: - ChipLogProgress(chipTool, " ***** Test Step 50 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_50(); - break; - case 51: - ChipLogProgress(chipTool, " ***** Test Step 51 : Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_51(); - break; - case 52: - ChipLogProgress(chipTool, " ***** Test Step 52 : Turn Off light for color control tests\n"); - err = TestTurnOffLightForColorControlTests_52(); - break; - case 53: - ChipLogProgress(chipTool, " ***** Test Step 53 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_53(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Query UniqueID\n"); + err = TestQueryUniqueID_18(); break; } @@ -16841,111 +17561,6 @@ class Test_TC_CC_9_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; - 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; - case 51: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 52: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 53: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -16959,7 +17574,7 @@ class Test_TC_CC_9_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 54; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -16973,826 +17588,744 @@ class Test_TC_CC_9_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() + CHIP_ERROR TestQueryDataModelRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition : Turn on light for color control tests Error: %@", err); + [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Data Model Revision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("dataModelRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestQueryVendorName_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic 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 readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Vendor Name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - + VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() + CHIP_ERROR TestQueryVendorID_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query VendorID Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("vendorID", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() + CHIP_ERROR TestQueryProductName_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); + [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Product Name Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("productName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("productName", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_5() + CHIP_ERROR TestQueryProductID_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:2]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query ProductID Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_6() + CHIP_ERROR TestQueryNodeLabel_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopDirection attribute from DUT Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Node Label Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_7() + CHIP_ERROR TestQueryUserLocation_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:4]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:30U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); + [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query User Location Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("location", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("location", [value length], 16)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_8() + CHIP_ERROR TestQueryHardwareVersion_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopTime attribute from DUT Error: %@", err); + [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query HardwareVersion Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopTime", actualValue, 30U)); - } - + VerifyOrReturn(CheckConstraintType("hardwareVersion", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_9() + CHIP_ERROR TestQueryHardwareVersionString_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:8]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:160U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); + [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query HardwareVersionString Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("hardwareVersionString", "", "string")); + VerifyOrReturn(CheckConstraintMinLength("hardwareVersionString", [value length], 1)); + VerifyOrReturn(CheckConstraintMaxLength("hardwareVersionString", [value length], 64)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_10() + CHIP_ERROR TestThReadsSoftwareVersionStringFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_10() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsManufacturingDateFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_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 TestQueryPartNumber_12() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorLoopStartEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStartEnhancedHue attribute from DUT Error: %@", err); + [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query PartNumber Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStartEnhancedHue", actualValue, 160U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("partNumber", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("partNumber", [value length], 32)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_11() + CHIP_ERROR TestThReadsProductURLFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_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 TestQueryProductLabel_14() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:1]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); + [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query ProductLabel Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("productLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("productLabel", [value length], 64)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_12() + CHIP_ERROR TestQuerySerialNumber_15() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query SerialNumber Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 1)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("serialNumber", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("serialNumber", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull EnhancedCurrentHueValue1; - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_13() + CHIP_ERROR TestQueryLocalConfigDisabled_16() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query LocalConfigDisabled Error: %@", err); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - { - EnhancedCurrentHueValue1 = value; + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("localConfigDisabled", "", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_14() + CHIP_ERROR TestQueryReachable_17() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); + [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query Reachable Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStoredEnhancedHue", actualValue, EnhancedCurrentHueValue1)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("reachable", "", "boolean")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_15() + CHIP_ERROR TestQueryUniqueID_18() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); + [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query UniqueID Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("uniqueID", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("uniqueID", [value length], 32)); + NextTest(); + }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_16() +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) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl 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 readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); + ~Test_TC_DESC_1_1() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); - } + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); + } - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\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 : 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"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : 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_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; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - NSNumber * _Nonnull ColorLoopStoredEnhancedHueValue1; - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_17() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl 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; + } - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. 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(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); - { - ColorLoopStoredEnhancedHueValue1 = value; - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 7; - 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 TestReadEnhancedCurrentHueAttributeFromDut_18() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT 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("EnhancedCurrentHue", actualValue, ColorLoopStoredEnhancedHueValue1)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_19() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:2]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:1]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_20() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopDirection 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)); { id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 1)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_21() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:1]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_22() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from 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)); { id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull EnhancedCurrentHueValue2; - - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_23() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - { - EnhancedCurrentHueValue2 = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_24() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStoredEnhancedHue", actualValue, EnhancedCurrentHueValue2)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_25() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes 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 TestReadColorLoopActiveAttributeFromDut_26() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT 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("ColorLoopActive", actualValue, 0)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull ColorLoopStoredEnhancedHueValue2; - - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_27() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); - { - ColorLoopStoredEnhancedHueValue2 = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_28() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT 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("EnhancedCurrentHue", actualValue, ColorLoopStoredEnhancedHueValue2)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestEnhancedMoveToHueCommand_29() +class Test_TC_EMR_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_EMR_1_1() + : TestCommandBridge("Test_TC_EMR_1_1") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.enhancedHue = [NSNumber numberWithUnsignedShort:40960U]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [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; + 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 TestWait2000ms_30() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); - } + ~Test_TC_EMR_1_1() {} - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_31() + /////////// TestCommand Interface ///////// + void NextTest() override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_EMR_1_1\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_EMR_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 40960U)); - } + 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 global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: + ChipLogProgress( + chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_5(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_32() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:2]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - 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), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + 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; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_33() + chip::System::Clock::Timeout GetWaitDuration() const override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopDirection attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_34() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:2]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 6; - return CHIP_NO_ERROR; - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_35() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull EnhancedCurrentHueValue3; - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_36() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT 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)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); { - EnhancedCurrentHueValue3 = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } NextTest(); @@ -17801,115 +18334,65 @@ class Test_TC_CC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_37() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStoredEnhancedHue", actualValue, EnhancedCurrentHueValue3)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_38() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_39() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull ColorLoopStoredEnhancedHueValue3; - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_40() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + id clusterRevisionArgument; + clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); - { - ColorLoopStoredEnhancedHueValue3 = value; - } + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_41() + CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, ColorLoopStoredEnhancedHueValue3)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } NextTest(); @@ -17918,314 +18401,59 @@ class Test_TC_CC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_42() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:2]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:1]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_43() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopDirection attribute from 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 1)); - } - + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_44() +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) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:2]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes 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 TestReadColorLoopActiveAttributeFromDut_45() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull EnhancedCurrentHueValue4; + ~Test_TC_DGETH_2_1() {} - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_46() + /////////// TestCommand Interface ///////// + void NextTest() override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT Error: %@", err); + 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"); + } - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "", "uint16")); - { - EnhancedCurrentHueValue4 = value; - } + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_47() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStoredEnhancedHue", actualValue, EnhancedCurrentHueValue4)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_48() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_49() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull ColorLoopStoredEnhancedHue4; - - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_50() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); - { - ColorLoopStoredEnhancedHue4 = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_51() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, ColorLoopStoredEnhancedHue4)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTurnOffLightForColorControlTests_52() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn Off light for color control tests Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_53() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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_9_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_9_2() - : TestCommandBridge("Test_TC_CC_9_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_CC_9_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_2\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 @@ -18237,140 +18465,110 @@ class Test_TC_CC_9_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: Turn on light for color control tests\n"); - err = TestPreconditionTurnOnLightForColorControlTests_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read PHYRate attribute constraints\n"); + err = TestReadPHYRateAttributeConstraints_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: Check on/off attribute value is true after on command\n"); - err = TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FullDuplex attribute constraints\n"); + err = TestReadFullDuplexAttributeConstraints_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read PacketRxCount attribute constraints\n"); + err = TestReadPacketRxCountAttributeConstraints_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { + 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")) { NextTest(); return; } - err = TestReadColorLoopActiveAttributeFromDut_4(); + err = TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read PacketTxCount attribute constraints\n"); + err = TestReadPacketTxCountAttributeConstraints_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPTIME")) { + 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")) { NextTest(); return; } - err = TestReadColorLoopTimeAttributeFromDut_6(); + err = TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read TxErrCount attribute constraints\n"); + err = TestReadTxErrCountAttributeConstraints_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read EnhancedCurrentHue attribute from DUT.\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { + 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")) { NextTest(); return; } - err = TestReadEnhancedCurrentHueAttributeFromDut_8(); + err = TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Color Loop Set Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestColorLoopSetCommandSetAllAttributes_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Read CollisionCount attribute constraints\n"); + err = TestReadCollisionCountAttributeConstraints_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read ColorLoopActive attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { + 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")) { NextTest(); return; } - err = TestReadColorLoopActiveAttributeFromDut_10(); + err = TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Read OverrunCount attribute constraints\n"); + err = TestReadOverrunCountAttributeConstraints_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { + 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")) { NextTest(); return; } - err = TestColorLoopSetCommandStartColorLoop_12(); + err = TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopDirection attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Read CarrierDetect attribute constraints\n"); + err = TestReadCarrierDetectAttributeConstraints_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { + 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")) { NextTest(); return; } - err = TestColorLoopSetCommandStartColorLoop_14(); + err = TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Read TimeSinceReset attribute constraints\n"); + err = TestReadTimeSinceResetAttributeConstraints_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read EnhancedCurrentHue attribute from DUT.\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { + 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")) { NextTest(); return; } - err = TestReadEnhancedCurrentHueAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Turn off light for color control tests\n"); - err = TestTurnOffLightForColorControlTests_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); + err = TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16(); break; } @@ -18434,15 +18632,6 @@ class Test_TC_CC_9_2 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -18456,7 +18645,7 @@ class Test_TC_CC_9_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -18470,37 +18659,24 @@ class Test_TC_CC_9_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() + CHIP_ERROR TestReadPHYRateAttributeConstraints_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: 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 TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Precondition: 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")); + VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9U)); } NextTest(); @@ -18509,46 +18685,22 @@ class Test_TC_CC_9_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:15]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:30U]; - params.startHue = [NSNumber numberWithUnsignedShort:160U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() + CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("fullDuplex", "", "bool")); } NextTest(); @@ -18557,207 +18709,170 @@ class Test_TC_CC_9_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() + CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopDirection attribute from DUT. 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("packetRxCount", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() + 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() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopTime attribute from DUT. 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopTime", actualValue, 30U)); - } - + VerifyOrReturn(CheckConstraintType("packetTxCount", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() + CHIP_ERROR TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStartEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStartEnhancedHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStartEnhancedHue", actualValue, 160U)); - } - - 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); } - NSNumber * _Nonnull EnhancedCurrentHueValue; - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_8() + CHIP_ERROR TestReadTxErrCountAttributeConstraints_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue 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("enhancedCurrentHue", "", "uint16")); - { - EnhancedCurrentHueValue = value; - } - + VerifyOrReturn(CheckConstraintType("txErrCount", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_9() + CHIP_ERROR + TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:1]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Color Loop Set Command - Set all Attributes 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 TestReadColorLoopActiveAttributeFromDut_10() + CHIP_ERROR TestReadCollisionCountAttributeConstraints_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT. 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 1)); - } - + VerifyOrReturn(CheckConstraintType("collisionCount", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_11() + CHIP_ERROR + TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStoredEnhancedHue", actualValue, EnhancedCurrentHueValue)); - } - - 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 TestColorLoopSetCommandStartColorLoop_12() + CHIP_ERROR TestReadOverrunCountAttributeConstraints_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:2]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:1]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Color Loop Set Command - Start Color Loop 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(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("overrunCount", "", "uint64")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_13() + CHIP_ERROR + TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadCarrierDetectAttributeConstraints_13() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopDirection 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopDirection", actualValue, 1)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("carrierDetect", "", "bool")); } NextTest(); @@ -18766,145 +18881,51 @@ class Test_TC_CC_9_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_14() + CHIP_ERROR + TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Color Loop Set Command - Start Color Loop 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 TestReadColorLoopActiveAttributeFromDut_15() + CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_15() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("timeSinceReset", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull ColorLoopStoredEnhancedHueValue; - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_16() + CHIP_ERROR TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); - { - ColorLoopStoredEnhancedHueValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_17() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, ColorLoopStoredEnhancedHueValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTurnOffLightForColorControlTests_18() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light for color control tests Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not 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_9_3 : public TestCommandBridge { +class Test_TC_DGETH_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_9_3() - : TestCommandBridge("Test_TC_CC_9_3") + Test_TC_DGETH_2_2() + : TestCommandBridge("Test_TC_DGETH_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -18914,7 +18935,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CC_9_3() {} + ~Test_TC_DGETH_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -18922,11 +18943,11 @@ class Test_TC_CC_9_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CC_9_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CC_9_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -18943,140 +18964,52 @@ class Test_TC_CC_9_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition: Turn on light for color control tests\n"); - err = TestPreconditionTurnOnLightForColorControlTests_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: Check on/off attribute value is true after on command\n"); - err = TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends ColorLoopSet Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestSendsColorLoopSetCommandSetAllAttributes_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read ColorLoopDirection attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPDIRECTION")) { - NextTest(); - return; - } - err = TestReadColorLoopDirectionAttributeFromDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read ColorLoopTime attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPTIME")) { - NextTest(); - return; - } - err = TestReadColorLoopTimeAttributeFromDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read ColorLoopStartEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTARTENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStartEnhancedHueAttributeFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Color Loop Set Command - Set all Attributes\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { - NextTest(); - return; - } - err = TestColorLoopSetCommandSetAllAttributes_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read ColorLoopActive attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { - NextTest(); - return; - } - err = TestReadColorLoopActiveAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read EnhancedCurrentHue attribute from DUT.\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { - NextTest(); - return; - } - err = TestReadEnhancedCurrentHueAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { - NextTest(); - return; - } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : Sends ResetCounts command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestColorLoopSetCommandStartColorLoop_12(); + err = TestSendsResetCountsCommand_1(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read ColorLoopTime attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPTIME")) { + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the PacketRxCount attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadColorLoopTimeAttributeFromDut_13(); + err = TestReadThePacketRxCountAttribute_2(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Color Loop Set Command - Start Color Loop\n"); - if (ShouldSkip("CR_COLORLOOPSET")) { + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the PacketTxCount attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestColorLoopSetCommandStartColorLoop_14(); + err = TestReadThePacketTxCountAttribute_3(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read ColorLoopActive attribute from DUT\n"); - if (ShouldSkip("A_COLORLOOPACTIVE")) { + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the TxErrCount attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadColorLoopActiveAttributeFromDut_15(); + err = TestReadTheTxErrCountAttribute_4(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read ColorLoopStoredEnhancedHue attribute from DUT.\n"); - if (ShouldSkip("A_COLORLOOPSTOREDENHANCEDHUE")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the CollisionCount attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadColorLoopStoredEnhancedHueAttributeFromDut_16(); + err = TestReadTheCollisionCountAttribute_5(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read EnhancedCurrentHue attribute from DUT.\n"); - if (ShouldSkip("A_ENHANCEDCURRENTHUE")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the OverrunCount attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEnhancedCurrentHueAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Turn off light for color control tests\n"); - err = TestTurnOffLightForColorControlTests_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); + err = TestReadTheOverrunCountAttribute_6(); break; } @@ -19110,45 +19043,6 @@ class Test_TC_CC_9_3 : 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; } // Go on to the next test. @@ -19162,7 +19056,7 @@ class Test_TC_CC_9_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -19176,14 +19070,16 @@ class Test_TC_CC_9_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_1() + CHIP_ERROR TestSendsResetCountsCommand_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: Turn on light for color control tests Error: %@", err); + [cluster resetCountsWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends ResetCounts command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -19193,20 +19089,22 @@ class Test_TC_CC_9_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestReadThePacketRxCountAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Precondition: Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the PacketRxCount attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("PacketRxCount", actualValue, 0ULL)); } NextTest(); @@ -19215,46 +19113,46 @@ class Test_TC_CC_9_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_3() + CHIP_ERROR TestReadThePacketTxCountAttribute_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:15]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:30U]; - params.startHue = [NSNumber numberWithUnsignedShort:160U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends ColorLoopSet Command - Set all Attributes Error: %@", err); + [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the PacketTxCount attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("PacketTxCount", actualValue, 0ULL)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_4() + CHIP_ERROR TestReadTheTxErrCountAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT Error: %@", err); + [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the TxErrCount attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopActive", actualValue, 0)); + VerifyOrReturn(CheckValue("TxErrCount", actualValue, 0ULL)); } NextTest(); @@ -19263,20 +19161,22 @@ class Test_TC_CC_9_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopDirectionAttributeFromDut_5() + CHIP_ERROR TestReadTheCollisionCountAttribute_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopDirectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopDirection attribute from DUT. Error: %@", err); + [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("ColorLoopDirection", actualValue, 0)); + VerifyOrReturn(CheckValue("CollisionCount", actualValue, 0ULL)); } NextTest(); @@ -19285,20 +19185,22 @@ class Test_TC_CC_9_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopTimeAttributeFromDut_6() + CHIP_ERROR TestReadTheOverrunCountAttribute_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopTime attribute from DUT. Error: %@", err); + [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("ColorLoopTime", actualValue, 30U)); + VerifyOrReturn(CheckValue("OverrunCount", actualValue, 0ULL)); } NextTest(); @@ -19306,258 +19208,376 @@ class Test_TC_CC_9_3 : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadColorLoopStartEnhancedHueAttributeFromDut_7() +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) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl 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 - readAttributeColorLoopStartEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStartEnhancedHue attribute from DUT. Error: %@", err); + ~Test_TC_FLW_1_1() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStartEnhancedHue", actualValue, 160U)); - } + 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: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : 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_3(); + break; + case 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 global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " + "attribute has the value 0\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_6(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_8() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl 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; + } - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:1]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Color Loop Set Command - Set all Attributes 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 = 7; - return CHIP_NO_ERROR; + 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 TestReadColorLoopActiveAttributeFromDut_9() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT. 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("ColorLoopActive", actualValue, 1)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull EnhancedCurrentHueValue; - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_10() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from 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("enhancedCurrentHue", "", "uint16")); - { - EnhancedCurrentHueValue = value; - } - + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorLoopStoredEnhancedHue", actualValue, EnhancedCurrentHueValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_12() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:4]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:60U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Color Loop Set Command - Start Color Loop 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 TestReadColorLoopTimeAttributeFromDut_13() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopTime attribute from DUT. 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("ColorLoopTime", actualValue, 60U)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestColorLoopSetCommandStartColorLoop_14() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPColorControlClusterColorLoopSetParams alloc] init]; - params.updateFlags = [NSNumber numberWithUnsignedChar:1]; - params.action = [NSNumber numberWithUnsignedChar:0]; - params.direction = [NSNumber numberWithUnsignedChar:0]; - params.time = [NSNumber numberWithUnsignedShort:0U]; - params.startHue = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster colorLoopSetWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Color Loop Set Command - Start Color Loop Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadColorLoopActiveAttributeFromDut_15() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorLoopActiveWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopActive attribute from DUT 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("ColorLoopActive", actualValue, 0)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull ColorLoopStoredEnhancedHueValue; - CHIP_ERROR TestReadColorLoopStoredEnhancedHueAttributeFromDut_16() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_6() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorLoopStoredEnhancedHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read ColorLoopStoredEnhancedHue attribute from DUT. Error: %@", err); + 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("alpha", value); + } +}; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); +class Test_TC_FLW_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_FLW_2_1() + : TestCommandBridge("Test_TC_FLW_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) - VerifyOrReturn(CheckConstraintType("colorLoopStoredEnhancedHue", "", "uint16")); - { - ColorLoopStoredEnhancedHueValue = value; - } + ~Test_TC_FLW_2_1() {} - NextTest(); - }]; + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - return CHIP_NO_ERROR; + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_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 : Read the mandatory attribute: MeasuredValue\n"); + err = TestReadTheMandatoryAttributeMeasuredValue_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: MinMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the mandatory attribute: MaxMeasuredValue\n"); + err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : read the optional attribute: Tolerance\n"); + err = TestReadTheOptionalAttributeTolerance_4(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadEnhancedCurrentHueAttributeFromDut_17() + 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; + } + + // 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 = 5; + + 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 TestReadTheMandatoryAttributeMeasuredValue_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestColorControl * cluster = [[CHIPTestColorControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read EnhancedCurrentHue attribute from DUT. 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, ColorLoopStoredEnhancedHueValue)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); } NextTest(); @@ -19566,39 +19586,70 @@ class Test_TC_CC_9_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightForColorControlTests_18() + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light for color control tests 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)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement 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 readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeTolerance_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement 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); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + NextTest(); }]; @@ -19606,11 +19657,11 @@ class Test_TC_CC_9_3 : public TestCommandBridge { } }; -class Test_TC_DM_2_1 : public TestCommandBridge { +class Test_TC_CGEN_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DM_2_1() - : TestCommandBridge("Test_TC_DM_2_1") + Test_TC_CGEN_1_1() + : TestCommandBridge("Test_TC_CGEN_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -19620,7 +19671,7 @@ class Test_TC_DM_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DM_2_1() {} + ~Test_TC_CGEN_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -19628,11 +19679,11 @@ class Test_TC_DM_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -19649,97 +19700,46 @@ class Test_TC_DM_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Query Data Model Revision\n"); - err = TestQueryDataModelRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Query Vendor Name\n"); - err = TestQueryVendorName_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Query VendorID\n"); - err = TestQueryVendorID_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Query Product Name\n"); - err = TestQueryProductName_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Query ProductID\n"); - err = TestQueryProductID_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Query Node Label\n"); - err = TestQueryNodeLabel_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Query User Location\n"); - err = TestQueryUserLocation_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Query HardwareVersion\n"); - err = TestQueryHardwareVersion_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Query HardwareVersionString\n"); - err = TestQueryHardwareVersionString_9(); - break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH reads SoftwareVersionString from the DUT and Verify it is of type string and verify the " - "format\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThReadsSoftwareVersionStringFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_10(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; - case 11: + case 4: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH reads ManufacturingDate from the DUT and Verify it is of type string and verify the " - "format\n"); + " ***** Test Step 4 : 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 = TestThReadsManufacturingDateFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_11(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Query PartNumber\n"); - if (ShouldSkip("PART_NUM")) { + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestQueryPartNumber_12(); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH reads ProductURL from the DUT and Verify it is of type string and verify the format\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThReadsProductURLFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Query ProductLabel\n"); - err = TestQueryProductLabel_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Query SerialNumber\n"); - err = TestQuerySerialNumber_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Query LocalConfigDisabled\n"); - err = TestQueryLocalConfigDisabled_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Query Reachable\n"); - err = TestQueryReachable_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Query UniqueID\n"); - err = TestQueryUniqueID_18(); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -19773,42 +19773,6 @@ class Test_TC_DM_2_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; } // Go on to the next test. @@ -19822,7 +19786,7 @@ class Test_TC_DM_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -19836,349 +19800,471 @@ class Test_TC_DM_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestQueryDataModelRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDataModelRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Data Model Revision 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)); - VerifyOrReturn(CheckConstraintType("dataModelRevision", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestQueryVendorName_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Vendor Name Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } - VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryVendorID_3() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query VendorID 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("vendorID", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryProductName_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Product Name 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("productName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("productName", [value length], 32)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(11))); + 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], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryProductID_5() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query ProductID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); - 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 TestQueryNodeLabel_6() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Node Label 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("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 4UL)); + } + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryUserLocation_7() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query User Location 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("location", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("location", [value length], 16)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 5UL)); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestQueryHardwareVersion_8() +class Test_TC_CGEN_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CGEN_2_1() + : TestCommandBridge("Test_TC_CGEN_2_1") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeHardwareVersionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query HardwareVersion Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("hardwareVersion", "", "uint16")); - 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 TestQueryHardwareVersionString_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ~Test_TC_CGEN_2_1() {} - [cluster readAttributeHardwareVersionStringWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query HardwareVersionString 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_CGEN_2_1\n"); + } - VerifyOrReturn(CheckConstraintType("hardwareVersionString", "", "string")); - VerifyOrReturn(CheckConstraintMinLength("hardwareVersionString", [value length], 1)); - VerifyOrReturn(CheckConstraintMaxLength("hardwareVersionString", [value length], 64)); - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - return CHIP_NO_ERROR; - } + Wait(); - CHIP_ERROR TestThReadsSoftwareVersionStringFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_10() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + // 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 : TH1 reads the BreadCrumb Attribute from the DUT\n"); + err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH1 writes the BreadCrumb attribute as 1 to the DUT\n"); + err = TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH1 reads the BreadCrumb attribute from the DUT\n"); + err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH1 reads the RegulatoryConfig attribute from the DUT\n"); + err = TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH1 reads the LocationCapability attribute from the DUT\n"); + err = TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the " + "BasicCommissioningInfo attribute has the following field: FailSafeExpiryLengthSeconds field value is within a " + "duration range of 0 to 65535\n"); + err = TestTh1ReadsBasicCommissioningInfoAttributeFromDutAndVerifyThatTheBasicCommissioningInfoAttributeHasTheFollowingFieldFailSafeExpiryLengthSecondsFieldValueIsWithinADurationRangeOf0To65535_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Step 6 TC-CGEN-2.1\n"); + err = TestStep6TcCgen21_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH1 reads SupportsConcurrentConnection attribute from the DUT\n"); + err = TestTh1ReadsSupportsConcurrentConnectionAttributeFromTheDut_8(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestThReadsManufacturingDateFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_11() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("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; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestQueryPartNumber_12() + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 9; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional 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 TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePartNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query PartNumber Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the BreadCrumb Attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("partNumber", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("partNumber", [value length], 32)); + VerifyOrReturn(CheckConstraintType("breadcrumb", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsProductURLFromTheDutAndVerifyItIsOfTypeStringAndVerifyTheFormat_13() + CHIP_ERROR TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning 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(@"TH1 writes the BreadCrumb attribute as 1 to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryProductLabel_14() + CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query ProductLabel Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the BreadCrumb attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("productLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("productLabel", [value length], 64)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQuerySerialNumber_15() + CHIP_ERROR TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeSerialNumberWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query SerialNumber Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeRegulatoryConfigWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the RegulatoryConfig attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("serialNumber", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("serialNumber", [value length], 32)); + VerifyOrReturn(CheckConstraintMinValue("regulatoryConfig", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("regulatoryConfig", [value unsignedCharValue], 2U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryLocalConfigDisabled_16() + CHIP_ERROR TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocalConfigDisabledWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query LocalConfigDisabled Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeLocationCapabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads the LocationCapability attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("localConfigDisabled", "", "boolean")); + VerifyOrReturn(CheckConstraintMinValue("locationCapability", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("locationCapability", [value unsignedCharValue], 2U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryReachable_17() + CHIP_ERROR + TestTh1ReadsBasicCommissioningInfoAttributeFromDutAndVerifyThatTheBasicCommissioningInfoAttributeHasTheFollowingFieldFailSafeExpiryLengthSecondsFieldValueIsWithinADurationRangeOf0To65535_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeReachableWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query Reachable Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster readAttributeBasicCommissioningInfoWithCompletionHandler:^( + CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable err) { + NSLog( + @"TH1 reads BasicCommissioningInfo attribute from DUT and Verify that the BasicCommissioningInfo attribute has the " + @"following field: FailSafeExpiryLengthSeconds field value is within a duration range of 0 to 65535 Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("reachable", "", "boolean")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryUniqueID_18() + CHIP_ERROR TestStep6TcCgen21_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("Step 6 is implicitly validating the attribute(BasicCommissioningInfo) constraints, as long " + "as the payload is being parsed successfullygarbage: not in length on purpose", + 134); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestTh1ReadsSupportsConcurrentConnectionAttributeFromTheDut_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUniqueIDWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query UniqueID Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + [cluster + readAttributeSupportsConcurrentConnectionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH1 reads SupportsConcurrentConnection attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("uniqueID", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("uniqueID", [value length], 32)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("supportsConcurrentConnection", "", "bool")); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_DESC_1_1 : public TestCommandBridge { +class Test_TC_DGGEN_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") + Test_TC_DGGEN_1_1() + : TestCommandBridge("Test_TC_DGGEN_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -20188,7 +20274,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DESC_1_1() {} + ~Test_TC_DGGEN_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -20196,11 +20282,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -20226,6 +20312,10 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: @@ -20295,7 +20385,9 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -20318,7 +20410,9 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -20341,7 +20435,9 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -20349,6 +20445,18 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 8UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; @@ -20359,7 +20467,9 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -20369,7 +20479,8 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -20382,7 +20493,9 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestDescriptor * cluster = [[CHIPTestDescriptor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -20403,11 +20516,11 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { } }; -class Test_TC_EMR_1_1 : public TestCommandBridge { +class Test_TC_DGGEN_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_EMR_1_1() - : TestCommandBridge("Test_TC_EMR_1_1") + Test_TC_DGGEN_2_1() + : TestCommandBridge("Test_TC_DGGEN_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -20417,7 +20530,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_EMR_1_1() {} + ~Test_TC_DGGEN_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -20425,11 +20538,11 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_EMR_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_EMR_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -20446,25 +20559,70 @@ class Test_TC_EMR_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 NetworkInterfaces structure attribute from DUT.\n"); + err = TestThReadsNetworkInterfacesStructureAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads a RebootCount attribute value from DUT.\n"); + err = TestThReadsARebootCountAttributeValueFromDut_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reboot DUT (node)\n"); + err = TestRebootDutNode_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot DUT (node)\n"); + err = TestRebootDutNode_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_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 : DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of " + "DUT rebooting.\n"); + err = TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads a TotalOperationalHours attribute value from DUT.\n"); + err = TestThReadsATotalOperationalHoursAttributeValueFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reboot DUT (node)\n"); + err = TestRebootDutNode_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads BootReason attribute value from DUT.\n"); + err = TestThReadsBootReasonAttributeValueFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ActiveHardwareFaults attribute value from DUT.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsActiveHardwareFaultsAttributeValueFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads ActiveRadioFaults attribute value from DUT.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsActiveRadioFaultsAttributeValueFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ActiveNetworkFaults attribute value from DUT.\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsActiveNetworkFaultsAttributeValueFromDut_13(); break; } @@ -20487,7 +20645,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -20495,6 +20653,30 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -20508,7 +20690,7 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -20522,124 +20704,176 @@ class Test_TC_EMR_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThReadsNetworkInterfacesStructureAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics 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 readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - + VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestThReadsARebootCountAttributeValueFromDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics 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 constraints: ClusterRevision Error: %@", err); + [cluster readAttributeRebootCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads a RebootCount attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("rebootCount", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestRebootDutNode_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:1U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + CHIP_ERROR TestRebootDutNode_4() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } - return CHIP_NO_ERROR; + 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 TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributeUpTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT rebooting. " + @"Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } - + VerifyOrReturn(CheckConstraintType("upTime", "", "uint64")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestThReadsATotalOperationalHoursAttributeValueFromDut_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestElectricalMeasurement * cluster = [[CHIPTestElectricalMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics 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 readAttributeTotalOperationalHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads a TotalOperationalHours attribute value from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintType("totalOperationalHours", "", "uint32")); 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 TestRebootDutNode_8() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_9() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsBootReasonAttributeValueFromDut_10() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeBootReasonsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads BootReason attribute value from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("bootReasons", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("bootReasons", [value unsignedCharValue], 6U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsActiveHardwareFaultsAttributeValueFromDut_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 TestThReadsActiveRadioFaultsAttributeValueFromDut_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsActiveNetworkFaultsAttributeValueFromDut_13() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } +}; + +class Test_TC_I_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_I_1_1() + : TestCommandBridge("Test_TC_I_1_1") + , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -20648,7 +20882,7 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_2_1() {} + ~Test_TC_I_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -20656,11 +20890,11 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGETH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -20677,110 +20911,44 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read PHYRate attribute constraints\n"); - err = TestReadPHYRateAttributeConstraints_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read FullDuplex attribute constraints\n"); - err = TestReadFullDuplexAttributeConstraints_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read PacketRxCount attribute constraints\n"); - err = TestReadPacketRxCountAttributeConstraints_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_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")) { - NextTest(); - return; - } - err = TestReadPacketRxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read PacketTxCount attribute constraints\n"); - err = TestReadPacketTxCountAttributeConstraints_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_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"); + " ***** 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 = TestReadPacketTxCountValueFromDutAndVerifyTheNumberOfPacketsReceivedOnEthernetNetworkInterface_6(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read TxErrCount attribute constraints\n"); - 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")) { - NextTest(); - return; - } - err = TestReadTxErrCountValueFromDutAndVerifyValueIndicatesTheNumberOfFailedPacketTransmissionOnEthernetNetworkInterface_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read CollisionCount attribute constraints\n"); - 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")) { - NextTest(); - return; - } - err = TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read OverrunCount attribute constraints\n"); - 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")) { - NextTest(); - return; - } - err = TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read CarrierDetect attribute constraints\n"); - 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")) { - NextTest(); - return; - } - err = TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read TimeSinceReset attribute constraints\n"); - 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"); + " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " + "attribute has the value 0\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16(); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); break; } @@ -20817,33 +20985,6 @@ class Test_TC_DGETH_2_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. @@ -20857,7 +20998,7 @@ class Test_TC_DGETH_2_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; @@ -20871,48 +21012,20 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadPHYRateAttributeConstraints_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePHYRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PHYRate attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("PHYRate", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("PHYRate", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("PHYRate", [value unsignedCharValue], 9)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadFullDuplexAttributeConstraints_2() + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 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 readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("fullDuplex", "", "bool")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } NextTest(); @@ -20921,180 +21034,103 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadPacketRxCountAttributeConstraints_3() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PacketRxCount attribute constraints Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("packetRxCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - 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 TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read PacketTxCount attribute constraints 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("packetTxCount", "", "uint64")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - 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() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read TxErrCount attribute constraints Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + } - VerifyOrReturn(CheckConstraintType("txErrCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - 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 TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCollisionCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CollisionCount attribute constraints 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("collisionCount", "", "uint64")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestReadCollisionCountValueFromDutAndVerifyValueIndicatesTheNumberOfCollisionOccurredWhileTransmittingPacketsOnEthernetNetworkInterface_10() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadOverrunCountAttributeConstraints_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 64UL)); + } - VerifyOrReturn(CheckConstraintType("overrunCount", "", "uint64")); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadOverrunCountValueFromDutAndVerifyValueIndicatesTheNumberOfPacketsDroppedDueToLackOfBufferMemoryOnEthernetNetworkInterface_12() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestReadCarrierDetectAttributeConstraints_13() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 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 readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("carrierDetect", "", "bool")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadCarrierDetectValueFromDutAndVerifyValueIndicatesThePresenceOfCarrierDetectControlSignalOnEthernetNetworkInterface_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); @@ -21103,41 +21139,21 @@ class Test_TC_DGETH_2_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTimeSinceResetAttributeConstraints_15() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("timeSinceReset", "", "uint64")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTimeSinceResetValueFromDutAndVerifyTheValueIndicatesTheDurationOfTimeInMinutes_16() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); return UserPrompt("alpha", value); } }; -class Test_TC_DGETH_2_2 : public TestCommandBridge { +class Test_TC_I_2_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_I_2_1() + : TestCommandBridge("Test_TC_I_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -21147,7 +21163,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGETH_2_2() {} + ~Test_TC_I_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -21155,11 +21171,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_I_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGETH_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -21176,52 +21192,12 @@ 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")) { - NextTest(); - return; - } - err = TestSendsResetCountsCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the IdentifyTime attribute from the DUT\n"); + err = TestThReadsTheIdentifyTimeAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the PacketRxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadThePacketRxCountAttribute_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the PacketTxCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadThePacketTxCountAttribute_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the TxErrCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheTxErrCountAttribute_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the CollisionCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheCollisionCountAttribute_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the OverrunCount attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheOverrunCountAttribute_6(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the IdentifyType attribute from the DUT\n"); + err = TestThReadsTheIdentifyTypeAttributeFromTheDut_2(); break; } @@ -21243,18 +21219,6 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { 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; } // Go on to the next test. @@ -21268,7 +21232,7 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -21282,138 +21246,38 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendsResetCountsCommand_1() + CHIP_ERROR TestThReadsTheIdentifyTimeAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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 readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the IdentifyTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("identifyTime", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadThePacketRxCountAttribute_2() + CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketRxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketRxCount attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketRxCount", actualValue, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadThePacketTxCountAttribute_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePacketTxCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the PacketTxCount attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PacketTxCount", actualValue, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheTxErrCountAttribute_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTxErrCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the TxErrCount attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("TxErrCount", actualValue, 0ULL)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheCollisionCountAttribute_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics 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() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestEthernetNetworkDiagnostics * cluster = [[CHIPTestEthernetNetworkDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOverrunCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the OverrunCount attribute Error: %@", err); + [cluster readAttributeIdentifyTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the IdentifyType attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OverrunCount", actualValue, 0ULL)); - } + VerifyOrReturn(CheckConstraintType("identifyType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5U)); NextTest(); }]; @@ -21422,11 +21286,11 @@ class Test_TC_DGETH_2_2 : public TestCommandBridge { } }; -class Test_TC_FLW_1_1 : public TestCommandBridge { +class Test_TC_I_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLW_1_1() - : TestCommandBridge("Test_TC_FLW_1_1") + Test_TC_I_2_2() + : TestCommandBridge("Test_TC_I_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -21436,7 +21300,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FLW_1_1() {} + ~Test_TC_I_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -21444,11 +21308,11 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -21465,40 +21329,61 @@ class Test_TC_FLW_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 sends Identify command to DUT, with the identify time field set to 0x003c (60s).\n"); + err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT1\n"); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2(); break; case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); + err = TestWait10000ms_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : After 10 seconds, the TH reads IdentifyTime attribute from DUT\n"); + err = TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4(); + break; + case 5: ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); + " ***** 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")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); - break; - case 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 global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + err = TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5(); break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); + " ***** Test Step 6 : TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop " + "identifying).\n"); + err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT2\n"); + err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends IdentifyQuery command to DUT \n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_6(); + err = TestThSendsIdentifyQueryCommandToDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT\n"); + err = TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); + err = TestWait5000ms_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : After 5 seconds, the TH reads IdentifyTime attribute from DUT\n"); + err = TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_11(); break; } @@ -21532,6 +21417,21 @@ class Test_TC_FLW_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; } // Go on to the next test. @@ -21545,7 +21445,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -21559,48 +21459,75 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); + __auto_type * params = [[CHIPIdentifyClusterIdentifyParams alloc] init]; + params.identifyTime = [NSNumber numberWithUnsignedShort:60U]; + [cluster identifyWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Identify command to DUT, with the identify time field set to 0x003c (60s). Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); - } + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 55U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65U)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestWait10000ms_3() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After 10 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 45U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 55U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() + CHIP_ERROR + TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -21609,67 +21536,113 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPIdentifyClusterIdentifyParams alloc] init]; + params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; + [cluster + identifyWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop identifying). Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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 readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads immediately IdentifyTime attribute from DUT2 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("identify time", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_6() + CHIP_ERROR TestThSendsIdentifyQueryCommandToDut_8() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter '0' for successgarbage: not in length on purpose", 28); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); } + + CHIP_ERROR TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id identifyTimeArgument; + identifyTimeArgument = [NSNumber numberWithUnsignedShort:15U]; + [cluster writeAttributeIdentifyTimeWithValue:identifyTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait5000ms_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_11() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"After 5 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 5U)); + VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 15U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; -class Test_TC_FLW_2_1 : public TestCommandBridge { +class Test_TC_I_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_FLW_2_1() - : TestCommandBridge("Test_TC_FLW_2_1") + Test_TC_I_2_3() + : TestCommandBridge("Test_TC_I_2_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -21679,7 +21652,7 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_FLW_2_1() {} + ~Test_TC_I_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -21687,11 +21660,11 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -21704,60 +21677,110 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : 1.Wait for the commissioned device to be retrieved\n"); + err = Test1WaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " + "the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: MinMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMinMeasuredValue_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Manually check DUT executes a blink effect\n"); + err = TestManuallyCheckDutExecutesABlinkEffect_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: MaxMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMaxMeasuredValue_3(); + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " + "and the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : write the default value to optional attribute: MeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : check DUT executes a breathe effect\n"); + err = TestCheckDutExecutesABreatheEffect_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : write the default value to optional attribute: MinMeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5(); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and " + "the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : write the default value to optional attribute: MaxMeasuredValue\n"); - err = TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : check DUT executes an okay effect\n"); + err = TestCheckDutExecutesAnOkayEffect_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : read the mandatory attribute: MeasuredValue\n"); - err = TestReadTheMandatoryAttributeMeasuredValue_7(); + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel " + "change and the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : read the mandatory attribute: MinMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMinMeasuredValue_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : check DUT executes a channel change effect\n"); + err = TestCheckDutExecutesAChannelChangeEffect_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : read the mandatory attribute: MaxMeasuredValue\n"); - err = TestReadTheMandatoryAttributeMaxMeasuredValue_9(); + ChipLogProgress(chipTool, + " ***** Test Step 9 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " + "and the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : check DUT executes a breathe effect\n"); + err = TestCheckDutExecutesABreatheEffect_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_11(); + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish " + "effect and the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : write the default value to optional attribute: Tolerance\n"); - err = TestWriteTheDefaultValueToOptionalAttributeTolerance_12(); + ChipLogProgress( + chipTool, " ***** Test Step 12 : Manually check DUT stops the breathe effect after the current effect sequence\n"); + err = TestManuallyCheckDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : read the optional attribute: Tolerance\n"); - err = TestReadTheOptionalAttributeTolerance_13(); + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " + "and the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Manually check DUT executes a breathe effect\n"); + err = TestManuallyCheckDutExecutesABreatheEffect_14(); + break; + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + "effect and the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Check DUT stops the breathe effect as soon as possible.\n"); + err = TestCheckDutStopsTheBreatheEffectAsSoonAsPossible_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " + "and the effect variant field set to 0x42 unknown\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Check DUT executes a blink effect.\n"); + err = TestCheckDutExecutesABlinkEffect_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " + "effect and the effect variant field set to 0x00 default\n"); + err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19(); + break; + case 20: + ChipLogProgress( + chipTool, " ***** Test Step 20 : Check DUT stops any effect that may be still running as soon as possible\n"); + err = TestCheckDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20(); break; } @@ -21783,13 +21806,13 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -21807,11 +21830,32 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + 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. @@ -21825,322 +21869,339 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR Test1WaitForTheCommissionedDeviceToBeRetrieved_0() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_1() + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " + @"the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_2() + CHIP_ERROR TestManuallyCheckDutExecutesABlinkEffect_2() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " + @"the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_3() + CHIP_ERROR TestCheckDutExecutesABreatheEffect_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:2U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and the " + @"effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMeasuredValue_4() + CHIP_ERROR TestCheckDutExecutesAnOkayEffect_6() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id measuredValueArgument; - measuredValueArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeMeasuredValueWithValue:measuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default value to optional attribute: MeasuredValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes an okay effectgarbage: not in length on purpose", 27); + return UserPrompt("alpha", value); } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMinMeasuredValue_5() + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id minMeasuredValueArgument; - minMeasuredValueArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeMinMeasuredValueWithValue:minMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default value to optional attribute: MinMeasuredValue Error: %@", err); + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:11U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel " + @"change and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeMaxMeasuredValue_6() + CHIP_ERROR TestCheckDutExecutesAChannelChangeEffect_8() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id maxMeasuredValueArgument; - maxMeasuredValueArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributeMaxMeasuredValueWithValue:maxMeasuredValueArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default value to optional attribute: MaxMeasuredValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a channel change effectgarbage: not in length on purpose", 36); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_7() + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " + @"the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_8() + CHIP_ERROR TestCheckDutExecutesABreatheEffect_10() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_9() + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:254U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish " + @"effect and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_10() + CHIP_ERROR TestManuallyCheckDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "DUT stops the breathe effect after the current effect sequencegarbage: not in length on purpose", 62); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:1U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " + @"the effect variant field set to 0x00 default Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Tolerance", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_11() + CHIP_ERROR TestManuallyCheckDutExecutesABreatheEffect_14() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect " + @"and the effect variant field set to 0x00 default Error: %@", + err); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValueToOptionalAttributeTolerance_12() + CHIP_ERROR TestCheckDutStopsTheBreatheEffectAsSoonAsPossible_16() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("DUT stops the breathe effect as soon as possiblegarbage: not in length on purpose", 48); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id toleranceArgument; - toleranceArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeToleranceWithValue:toleranceArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"write the default value to optional attribute: Tolerance Error: %@", err); + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:0U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:66U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " + @"the effect variant field set to 0x42 unknown Error: %@", + err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeTolerance_13() + CHIP_ERROR TestCheckDutExecutesABlinkEffect_18() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestFlowMeasurement * cluster = [[CHIPTestFlowMeasurement alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestIdentify * cluster = [[CHIPTestIdentify 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); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; + params.effectIdentifier = [NSNumber numberWithUnsignedChar:255U]; + params.effectVariant = [NSNumber numberWithUnsignedChar:0U]; + [cluster triggerEffectWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect " + @"and the effect variant field set to 0x00 default Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Tolerance", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestCheckDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "DUT stops any effect that may be still running as soon as possiblegarbage: not in length on purpose", 66); + return UserPrompt("alpha", value); + } }; -class Test_TC_CGEN_1_1 : public TestCommandBridge { +class Test_TC_ILL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CGEN_1_1() - : TestCommandBridge("Test_TC_CGEN_1_1") + Test_TC_ILL_1_1() + : TestCommandBridge("Test_TC_ILL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -22150,7 +22211,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CGEN_1_1() {} + ~Test_TC_ILL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -22158,11 +22219,11 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -22179,23 +22240,15 @@ class Test_TC_CGEN_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: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: @@ -22210,19 +22263,21 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " + "attribute has the value 0\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); break; } @@ -22256,6 +22311,9 @@ class Test_TC_CGEN_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; } // Go on to the next test. @@ -22269,7 +22327,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -22286,43 +22344,53 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement 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 the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement 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 constraints : ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -22332,16 +22400,17 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 4UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -22363,9 +22432,9 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -22375,10 +22444,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 4UL)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -22391,9 +22457,9 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -22403,10 +22469,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 5UL)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); @@ -22415,13 +22478,22 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() + { + 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("alpha", value); + } }; -class Test_TC_CGEN_2_1 : public TestCommandBridge { +class Test_TC_ILL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CGEN_2_1() - : TestCommandBridge("Test_TC_CGEN_2_1") + Test_TC_ILL_2_1() + : TestCommandBridge("Test_TC_ILL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -22431,7 +22503,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_CGEN_2_1() {} + ~Test_TC_ILL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -22439,11 +22511,11 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -22460,32 +22532,24 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH1 reads the BreadCrumb Attribute from the DUT\n"); - err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); + err = TestThReadsMinMeasuredValueAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH1 writes the BreadCrumb attribute as 1 to the DUT\n"); - err = TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); + err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH1 reads the BreadCrumb attribute from the DUT\n"); - err = TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads MeasuredValue attribute from DUT\n"); + err = TestThReadsMeasuredValueAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH1 reads the RegulatoryConfig attribute from the DUT\n"); - err = TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads Tolerance attribute from DUT\n"); + err = TestThReadsToleranceAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH1 reads the LocationCapability attribute from the DUT\n"); - err = TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH1 reads BasicCommissioningInfo attribute from DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestTh1ReadsBasicCommissioningInfoAttributeFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads LightSensorType attribute from DUT\n"); + err = TestThReadsLightSensorTypeAttributeFromDut_5(); break; } @@ -22516,9 +22580,6 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -22532,7 +22593,7 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -22546,22 +22607,24 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_1() + CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the BreadCrumb Attribute from the DUT Error: %@", err); + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinMeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 0ULL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); } NextTest(); @@ -22570,45 +22633,25 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1WritesTheBreadCrumbAttributeAs1ToTheDut_2() + CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement 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(@"TH1 writes the BreadCrumb attribute as 1 to the DUT Error: %@", err); + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsTheBreadCrumbAttributeFromTheDut_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeBreadcrumbWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the BreadCrumb attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("Breadcrumb", actualValue, 1ULL)); - } + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); + } NextTest(); }]; @@ -22616,21 +22659,25 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsTheRegulatoryConfigAttributeFromTheDut_4() + CHIP_ERROR TestThReadsMeasuredValueAttributeFromDut_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRegulatoryConfigWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the RegulatoryConfig attribute from the DUT Error: %@", err); + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MeasuredValue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("regulatoryConfig", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("regulatoryConfig", [value unsignedCharValue], 2)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65534U)); + } NextTest(); }]; @@ -22638,21 +22685,22 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsTheLocationCapabilityAttributeFromTheDut_5() + CHIP_ERROR TestThReadsToleranceAttributeFromDut_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLocationCapabilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads the LocationCapability attribute from the DUT Error: %@", err); + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Tolerance attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("locationCapability", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("locationCapability", [value unsignedCharValue], 2)); + VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); NextTest(); }]; @@ -22660,26 +22708,22 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsBasicCommissioningInfoAttributeFromDut_6() + CHIP_ERROR TestThReadsLightSensorTypeAttributeFromDut_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralCommissioning * cluster = [[CHIPTestGeneralCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBasicCommissioningInfoWithCompletionHandler:^( - CHIPGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads BasicCommissioningInfo attribute from DUT Error: %@", err); + [cluster readAttributeLightSensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LightSensorType attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FailSafeExpiryLengthSeconds", - ((CHIPGeneralCommissioningClusterBasicCommissioningInfo *) actualValue).failSafeExpiryLengthSeconds, 60U)); - VerifyOrReturn(CheckValue("MaxCumulativeFailsafeSeconds", - ((CHIPGeneralCommissioningClusterBasicCommissioningInfo *) actualValue).maxCumulativeFailsafeSeconds, 900U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("lightSensorType", "", "enum8")); } NextTest(); @@ -22689,11 +22733,11 @@ class Test_TC_CGEN_2_1 : public TestCommandBridge { } }; -class Test_TC_DGGEN_1_1 : public TestCommandBridge { +class Test_TC_LVL_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGGEN_1_1() - : TestCommandBridge("Test_TC_DGGEN_1_1") + Test_TC_LVL_1_1() + : TestCommandBridge("Test_TC_LVL_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -22703,7 +22747,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGGEN_1_1() {} + ~Test_TC_LVL_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -22711,11 +22755,11 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -22732,24 +22776,38 @@ class Test_TC_DGGEN_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: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + 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 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_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 global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional global attribute: FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); break; } @@ -22780,6 +22838,9 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -22793,7 +22854,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -22810,47 +22871,37 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 the global attribute: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints : ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; @@ -22860,9 +22911,7 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -22870,6 +22919,25 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(14))); + 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], 10UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 11UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 12UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 13UL)); + VerifyOrReturn(CheckValue("", actualValue[11], 14UL)); + VerifyOrReturn(CheckValue("", actualValue[12], 15UL)); + VerifyOrReturn(CheckValue("", actualValue[13], 16384UL)); + } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; @@ -22877,12 +22945,19 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -22892,8 +22967,15 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(8))); 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(CheckConstraintType("acceptedCommandList", "", "list")); @@ -22903,25 +22985,22 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 3UL)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -22929,11 +23008,11 @@ class Test_TC_DGGEN_1_1 : public TestCommandBridge { } }; -class Test_TC_DGGEN_2_1 : public TestCommandBridge { +class Test_TC_LVL_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_DGGEN_2_1() - : TestCommandBridge("Test_TC_DGGEN_2_1") + Test_TC_LVL_2_1() + : TestCommandBridge("Test_TC_LVL_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -22943,7 +23022,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_DGGEN_2_1() {} + ~Test_TC_LVL_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -22951,11 +23030,11 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGGEN_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -22972,70 +23051,68 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads NetworkInterfaces structure attribute from DUT.\n"); - err = TestThReadsNetworkInterfacesStructureAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reset level to 254\n"); + err = TestResetLevelTo254_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads a RebootCount attribute value from DUT.\n"); - err = TestThReadsARebootCountAttributeValueFromDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); + err = TestWait100ms_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reboot DUT (node)\n"); - err = TestRebootDutNode_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentLevel attribute\n"); + err = TestReadsTheCurrentLevelAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reboot DUT (node)\n"); - err = TestRebootDutNode_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the RemainingTime attribute\n"); + err = TestReadsTheRemainingTimeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of " - "DUT rebooting.\n"); - err = TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads a TotalOperationalHours attribute value from DUT.\n"); - err = TestThReadsATotalOperationalHoursAttributeValueFromDut_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentFrequency attribute\n"); + err = TestReadsTheCurrentFrequencyAttribute_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reboot DUT (node)\n"); - err = TestRebootDutNode_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MinFrequency attribute\n"); + err = TestReadsTheMinFrequencyAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxFrequency attribute\n"); + err = TestReadsTheMaxFrequencyAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads BootReason attribute value from DUT.\n"); - err = TestThReadsBootReasonAttributeValueFromDut_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnOffTransitionTime attribute\n"); + err = TestReadsTheOnOffTransitionTimeAttribute_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ActiveHardwareFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsActiveHardwareFaultsAttributeValueFromDut_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnLevel attribute \n"); + err = TestReadsTheOnLevelAttribute_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads ActiveRadioFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsActiveRadioFaultsAttributeValueFromDut_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OnTransitionTime attribute \n"); + err = TestReadsTheOnTransitionTimeAttribute_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ActiveNetworkFaults attribute value from DUT.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsActiveNetworkFaultsAttributeValueFromDut_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute \n"); + err = TestReadsTheOffTransitionTimeAttribute_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute \n"); + err = TestReadsTheDefaultMoveRateAttribute_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the Options attribute \n"); + err = TestReadsTheOptionsAttribute_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the StartUpCurrentLevel attribute \n"); + err = TestReadsTheStartUpCurrentLevelAttribute_16(); break; } @@ -23090,6 +23167,15 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -23103,7 +23189,7 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 17; chip::Optional mNodeId; chip::Optional mCluster; @@ -23117,580 +23203,344 @@ class Test_TC_DGGEN_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsNetworkInterfacesStructureAttributeFromDut_1() + CHIP_ERROR TestResetLevelTo254_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNetworkInterfacesWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads NetworkInterfaces structure attribute from DUT. Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("networkInterfaces", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsARebootCountAttributeValueFromDut_2() + CHIP_ERROR TestWait100ms_2() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeRebootCountWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads a RebootCount attribute value from DUT. Error: %@", err); + [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("rebootCount", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 254U)); + } + + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootDutNode_3() + CHIP_ERROR TestReadsTheRemainingTimeAttribute_4() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestRebootDutNode_4() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the RemainingTime attribute Error: %@", err); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("remaining time", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestDutRebootsAndThReadsAUpTimeAttributeValueOfDutSinceSomeArbitraryStartTimeOfDutRebooting_6() + CHIP_ERROR TestReadsTheMinLevelAttribute_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUpTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"DUT reboots and TH reads a UpTime attribute value of DUT since some arbitrary start time of DUT rebooting. " - @"Error: %@", - err); + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MinLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("upTime", "", "uint64")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("min level", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 1U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsATotalOperationalHoursAttributeValueFromDut_7() + CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTotalOperationalHoursWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads a TotalOperationalHours attribute value from DUT. Error: %@", err); + [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MaxLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("totalOperationalHours", "", "uint32")); + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRebootDutNode_8() + CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_7() { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_9() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentFrequency attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("current frequency", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("currentFrequency", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsBootReasonAttributeValueFromDut_10() + CHIP_ERROR TestReadsTheMinFrequencyAttribute_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestGeneralDiagnostics * cluster = [[CHIPTestGeneralDiagnostics alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeBootReasonsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads BootReason attribute value from DUT. Error: %@", err); + [cluster readAttributeMinFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MinFrequency attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("bootReasons", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("bootReasons", [value unsignedCharValue], 6)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("min frequency", actualValue, 0U)); + } + VerifyOrReturn(CheckConstraintType("minFrequency", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsActiveHardwareFaultsAttributeValueFromDut_11() + CHIP_ERROR TestReadsTheMaxFrequencyAttribute_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); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestThReadsActiveRadioFaultsAttributeValueFromDut_12() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } + [cluster readAttributeMaxFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MaxFrequency attribute Error: %@", err); - CHIP_ERROR TestThReadsActiveNetworkFaultsAttributeValueFromDut_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); - } -}; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); -class Test_TC_I_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_1_1() - : TestCommandBridge("Test_TC_I_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) + { + id actualValue = value; + VerifyOrReturn(CheckValue("max frequency", actualValue, 0U)); + } - ~Test_TC_I_1_1() {} + VerifyOrReturn(CheckConstraintType("maxFrequency", "", "uint16")); + NextTest(); + }]; - /////////// TestCommand Interface ///////// - void NextTest() override + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_10() { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_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 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_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 global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_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")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_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 TestThReadsTheClusterRevisionAttributeFromTheDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnOffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + VerifyOrReturn(CheckValue("on off transition time", actualValue, 0U)); } + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadsTheOnLevelAttribute_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 constraints : ClusterRevision Error: %@", err); + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_12() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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); + [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_13() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OffTransitionTime attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 64UL)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_14() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the DefaultMoveRate attribute 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("defaultMoveRate", "", "uint8")); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "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); - } - - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() - { - 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("alpha", value); - } -}; - -class Test_TC_I_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_2_1() - : TestCommandBridge("Test_TC_I_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_I_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_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 : TH reads the IdentifyTime attribute from the DUT\n"); - err = TestThReadsTheIdentifyTimeAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the IdentifyType attribute from the DUT\n"); - err = TestThReadsTheIdentifyTypeAttributeFromTheDut_2(); - 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; - } - - // 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 = 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 TestThReadsTheIdentifyTimeAttributeFromTheDut_1() + CHIP_ERROR TestReadsTheOptionsAttribute_15() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 the IdentifyTime attribute from the DUT Error: %@", err); + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyTime", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("options", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("options", "", "map8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheIdentifyTypeAttributeFromTheDut_2() + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_16() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the IdentifyType attribute from the DUT Error: %@", err); + [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("identifyType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("identifyType", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("identifyType", [value unsignedCharValue], 5)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + } NextTest(); }]; @@ -23699,11 +23549,11 @@ class Test_TC_I_2_1 : public TestCommandBridge { } }; -class Test_TC_I_2_2 : public TestCommandBridge { +class Test_TC_LVL_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_2_2() - : TestCommandBridge("Test_TC_I_2_2") + Test_TC_LVL_2_2() + : TestCommandBridge("Test_TC_LVL_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -23713,7 +23563,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_I_2_2() {} + ~Test_TC_LVL_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -23721,11 +23571,11 @@ class Test_TC_I_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -23742,61 +23592,80 @@ class Test_TC_I_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : TH sends Identify command to DUT, with the identify time field set to 0x003c (60s).\n"); - err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OnOffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads immediately IdentifyTime attribute from DUT1\n"); - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : writes the OnOffTransitionTime attribute on the DUT\n"); + err = TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 10000ms\n"); - err = TestWait10000ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the OnOffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : After 10 seconds, the TH reads IdentifyTime attribute from DUT\n"); - err = TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the OnLevel attribute from the DUT\n"); + err = TestReadsTheOnLevelAttributeFromTheDut_4(); break; case 5: - 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")) { - NextTest(); - return; - } - err = TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : writes the OnLevel attribute on the DUT\n"); + err = TestWritesTheOnLevelAttributeOnTheDut_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop " - "identifying).\n"); - err = TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the OnLevel attribute from the DUT\n"); + err = TestReadsTheOnLevelAttributeFromTheDut_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads immediately IdentifyTime attribute from DUT2\n"); - err = TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the OnTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnTransitionTimeAttributeFromTheDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends IdentifyQuery command to DUT \n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThSendsIdentifyQueryCommandToDut_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Writes the OnTransitionTime attribute on the DUT\n"); + err = TestWritesTheOnTransitionTimeAttributeOnTheDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT\n"); - err = TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the OnTransitionTime attribute from the DUT\n"); + err = TestReadsTheOnTransitionTimeAttributeFromTheDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5000ms\n"); - err = TestWait5000ms_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOffTransitionTimeAttributeFromTheDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : After 5 seconds, the TH reads IdentifyTime attribute from DUT\n"); - err = TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Writes the OffTransitionTime attribute on the DUT\n"); + err = TestWritesTheOffTransitionTimeAttributeOnTheDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OffTransitionTime attribute from the DUT\n"); + err = TestReadsTheOffTransitionTimeAttributeFromTheDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute from the DUT\n"); + err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Writes the DefaultMoveRate attribute on the DUT\n"); + err = TestWritesTheDefaultMoveRateAttributeOnTheDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the DefaultMoveRate attribute from the DUT\n"); + err = TestReadsTheDefaultMoveRateAttributeFromTheDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the StartUpCurrentLevel attribute from the DUT\n"); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : writes the StartUpCurrentLevel attribute on the DUT\n"); + err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : reads the StartUpCurrentLevel attribute from the DUT\n"); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : writes back default value of OnOffTransitionTime attribute\n"); + err = TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19(); break; } @@ -23845,6 +23714,30 @@ class Test_TC_I_2_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; } // Go on to the next test. @@ -23858,7 +23751,7 @@ class Test_TC_I_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -23872,190 +23765,468 @@ class Test_TC_I_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x003c60s_1() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterIdentifyParams alloc] init]; - params.identifyTime = [NSNumber numberWithUnsignedShort:60U]; - [cluster identifyWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Identify command to DUT, with the identify time field set to 0x003c (60s). Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnOffTransitionTime attribute from the 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("on off transition time", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut1_2() + CHIP_ERROR TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:10U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"writes the OnOffTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 55U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 65U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_3() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestAfter10SecondsTheThReadsIdentifyTimeAttributeFromDut_4() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"After 10 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnOffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 45U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 55U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("on off transition time", actualValue, 10U)); + } + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable OnLevelValue; - CHIP_ERROR - TestThSendsIdentifyQueryCommandToDutAndVerifyIdentifyQueryResponseCommandToTHwithTheTimeoutFieldSetToAValueInTheRange0x0000To0x0032_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 TestThSendsIdentifyCommandToDutWithTheIdentifyTimeFieldSetTo0x0000StopIdentifying_6() + CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterIdentifyParams alloc] init]; - params.identifyTime = [NSNumber numberWithUnsignedShort:0U]; - [cluster - identifyWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop identifying). Error: %@", - err); + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + } + { + OnLevelValue = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsImmediatelyIdentifyTimeAttributeFromDut2_7() + CHIP_ERROR TestWritesTheOnLevelAttributeOnTheDut_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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); + id onLevelArgument; + onLevelArgument = [NSNumber numberWithUnsignedChar:254U]; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnLevel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("identify time", actualValue, 0U)); + VerifyOrReturn(CheckValueNonNull("on level", actualValue)); + VerifyOrReturn(CheckValue("on level", actualValue, 254U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); } + VerifyOrReturn(CheckConstraintNotValue("onLevel", value, OnLevelValue)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable OnTransitionTimeValue; - CHIP_ERROR TestThSendsIdentifyQueryCommandToDut_8() + CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + } + { + OnTransitionTimeValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesAValueOf0x000f15sToIdentifyTimeAttributeOfDut_9() + CHIP_ERROR TestWritesTheOnTransitionTimeAttributeOnTheDut_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id identifyTimeArgument; - identifyTimeArgument = [NSNumber numberWithUnsignedShort:15U]; - [cluster writeAttributeIdentifyTimeWithValue:identifyTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes a value of 0x000f (15s) to IdentifyTime attribute of DUT Error: %@", err); + id onTransitionTimeArgument; + onTransitionTimeArgument = [NSNumber numberWithUnsignedShort:100U]; + [cluster writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the OnTransitionTime attribute on the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_10() + CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("on transition time", actualValue)); + VerifyOrReturn(CheckValue("on transition time", actualValue, 100U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + } + VerifyOrReturn(CheckConstraintNotValue("onTransitionTime", value, OnTransitionTimeValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } + NSNumber * _Nullable OffTransitionTimeValue; - CHIP_ERROR TestAfter5SecondsTheThReadsIdentifyTimeAttributeFromDut_11() + CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_10() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeIdentifyTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"After 5 seconds, the TH reads IdentifyTime attribute from DUT Error: %@", err); + [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("identifyTime", [value unsignedShortValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("identifyTime", [value unsignedShortValue], 15U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + } + { + OffTransitionTimeValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesTheOffTransitionTimeAttributeOnTheDut_11() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id offTransitionTimeArgument; + offTransitionTimeArgument = [NSNumber numberWithUnsignedShort:100U]; + [cluster writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the OffTransitionTime attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_12() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("off transition time", actualValue)); + VerifyOrReturn(CheckValue("off transition time", actualValue, 100U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + } + VerifyOrReturn(CheckConstraintNotValue("offTransitionTime", value, OffTransitionTimeValue)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_13() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("default move rate", actualValue)); + VerifyOrReturn(CheckValue("default move rate", actualValue, 50U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesTheDefaultMoveRateAttributeOnTheDut_14() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id defaultMoveRateArgument; + defaultMoveRateArgument = [NSNumber numberWithUnsignedChar:100U]; + [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the DefaultMoveRate attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_15() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("default move rate", actualValue)); + VerifyOrReturn(CheckValue("default move rate", actualValue, 100U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nullable StartUpCurrentLevelValue; + + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + } + { + StartUpCurrentLevelValue = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_17() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id startUpCurrentLevelArgument; + startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:254U]; + [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_18() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("start up current level", actualValue)); + VerifyOrReturn(CheckValue("start up current level", actualValue, 254U)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + } + VerifyOrReturn(CheckConstraintNotValue("startUpCurrentLevel", value, StartUpCurrentLevelValue)); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestWritesBackDefaultValueOfOnOffTransitionTimeAttribute_19() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onOffTransitionTimeArgument; + onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"writes back default value of OnOffTransitionTime attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; -class Test_TC_I_2_3 : public TestCommandBridge { +class Test_TC_LVL_3_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_I_2_3() - : TestCommandBridge("Test_TC_I_2_3") + Test_TC_LVL_3_1() + : TestCommandBridge("Test_TC_LVL_3_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -24065,7 +24236,7 @@ class Test_TC_I_2_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_I_2_3() {} + ~Test_TC_LVL_3_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -24073,11 +24244,11 @@ class Test_TC_I_2_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -24090,110 +24261,68 @@ class Test_TC_I_2_3 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : 1.Wait for the commissioned device to be retrieved\n"); - err = Test1WaitForTheCommissionedDeviceToBeRetrieved_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 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " - "the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Manually check DUT executes a blink effect\n"); - err = TestManuallyCheckDutExecutesABlinkEffect_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_2(); break; case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " - "and the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : check DUT executes a breathe effect\n"); - err = TestCheckDutExecutesABreatheEffect_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and " - "the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 100ms\n"); + err = TestWait100ms_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : check DUT executes an okay effect\n"); - err = TestCheckDutExecutesAnOkayEffect_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel " - "change and the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : check DUT executes a channel change effect\n"); - err = TestCheckDutExecutesAChannelChangeEffect_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 11000 second\n"); + err = TestWait11000Second_8(); break; case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " - "and the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : check DUT executes a breathe effect\n"); - err = TestCheckDutExecutesABreatheEffect_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : reads On Off Transition Time attribute from DUT\n"); + err = TestReadsOnOffTransitionTimeAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish " - "effect and the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); + err = TestSendsAMoveToLevelCommand_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : Manually check DUT stops the breathe effect after the current effect sequence\n"); - err = TestManuallyCheckDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe " - "and the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Manually check DUT executes a breathe effect\n"); - err = TestManuallyCheckDutExecutesABreatheEffect_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Reset level to 254\n"); + err = TestResetLevelTo254_14(); break; case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " - "effect and the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Check DUT stops the breathe effect as soon as possible.\n"); - err = TestCheckDutStopsTheBreatheEffectAsSoonAsPossible_16(); - break; - case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink " - "and the effect variant field set to 0x42 unknown\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Check DUT executes a blink effect.\n"); - err = TestCheckDutExecutesABlinkEffect_18(); - break; - case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop " - "effect and the effect variant field set to 0x00 default\n"); - err = TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19(); - break; - case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : Check DUT stops any effect that may be still running as soon as possible\n"); - err = TestCheckDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); + err = TestWait100ms_15(); break; } @@ -24254,21 +24383,6 @@ class Test_TC_I_2_3 : 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; } // Go on to the next test. @@ -24282,339 +24396,284 @@ class Test_TC_I_2_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 16; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - CHIP_ERROR Test1WaitForTheCommissionedDeviceToBeRetrieved_0() + 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 - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x00Default_1() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:0]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " - @"the effect variant field set to 0x00 default 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestManuallyCheckDutExecutesABlinkEffect_2() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_3() + CHIP_ERROR TestReadsTheMinLevelAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:1]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " - @"the effect variant field set to 0x00 default Error: %@", - err); + [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MinLevel attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckDutExecutesABreatheEffect_4() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x02OkayAndTheEffectVariantFieldSetTo0x00Default_5() + CHIP_ERROR TestReadsTheMaxLevelAttribute_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:2]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x02 okay and the " - @"effect variant field set to 0x00 default Error: %@", - err); + [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the MaxLevel attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckDutExecutesAnOkayEffect_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("DUT executes an okay effectgarbage: not in length on purpose", 27); - return UserPrompt("alpha", value); - } - - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x0bChannelChangeAndTheEffectVariantFieldSetTo0x00Default_7() + CHIP_ERROR TestSendsAMoveToLevelCommand_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:11]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x0b channel " - @"change and the effect variant field set to 0x00 default Error: %@", - err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move to level 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 TestCheckDutExecutesAChannelChangeEffect_8() + CHIP_ERROR TestWait100ms_5() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("DUT executes a channel change effectgarbage: not in length on purpose", 36); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:1]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " - @"the effect variant field set to 0x00 default 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 64U)); + } - return CHIP_NO_ERROR; - } + NextTest(); + }]; - CHIP_ERROR TestCheckDutExecutesABreatheEffect_10() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xfeFinishEffectAndTheEffectVariantFieldSetTo0x00Default_11() + CHIP_ERROR TestSendsAMoveToLevelCommand_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:254]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xfe finish " - @"effect and the effect variant field set to 0x00 default Error: %@", - err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move to level 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 TestManuallyCheckDutStopsTheBreatheEffectAfterTheCurrentEffectSequence_12() + CHIP_ERROR TestWait11000Second_8() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "DUT stops the breathe effect after the current effect sequencegarbage: not in length on purpose", 62); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 11000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x01BreatheAndTheEffectVariantFieldSetTo0x00Default_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:1]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x01 breathe and " - @"the effect variant field set to 0x00 default 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 100U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestManuallyCheckDutExecutesABreatheEffect_14() + CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("DUT executes a breathe effectgarbage: not in length on purpose", 29); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads On Off Transition Time attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_15() + CHIP_ERROR TestSendsAMoveToLevelCommand_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:255]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect " - @"and the effect variant field set to 0x00 default Error: %@", - err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:128U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move to level 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 TestCheckDutStopsTheBreatheEffectAsSoonAsPossible_16() + CHIP_ERROR TestWait1000ms_12() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("DUT stops the breathe effect as soon as possiblegarbage: not in length on purpose", 48); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0x00BlinkAndTheEffectVariantFieldSetTo0x42Unknown_17() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:0]; - params.effectVariant = [NSNumber numberWithUnsignedChar:66]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0x00 blink and " - @"the effect variant field set to 0x42 unknown 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 128U)); + } - return CHIP_NO_ERROR; - } + NextTest(); + }]; - CHIP_ERROR TestCheckDutExecutesABlinkEffect_18() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("DUT executes a blink effectgarbage: not in length on purpose", 27); - return UserPrompt("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR - TestThSendsTriggerEffectCommandToDutWithTheEffectIdentifierFieldSetTo0xffStopEffectAndTheEffectVariantFieldSetTo0x00Default_19() + CHIP_ERROR TestResetLevelTo254_14() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIdentify * cluster = [[CHIPTestIdentify alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPIdentifyClusterTriggerEffectParams alloc] init]; - params.effectIdentifier = [NSNumber numberWithUnsignedChar:255]; - params.effectVariant = [NSNumber numberWithUnsignedChar:0]; - [cluster triggerEffectWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends TriggerEffect command to DUT with the effect identifier field set to 0xff stop effect " - @"and the effect variant field set to 0x00 default Error: %@", - err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckDutStopsAnyEffectThatMayBeStillRunningAsSoonAsPossible_20() + CHIP_ERROR TestWait100ms_15() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "DUT stops any effect that may be still running as soon as possiblegarbage: not in length on purpose", 66); - return UserPrompt("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } }; -class Test_TC_ILL_1_1 : public TestCommandBridge { +class Test_TC_LVL_4_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ILL_1_1() - : TestCommandBridge("Test_TC_ILL_1_1") + Test_TC_LVL_4_1() + : TestCommandBridge("Test_TC_LVL_4_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -24624,7 +24683,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ILL_1_1() {} + ~Test_TC_LVL_4_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -24632,11 +24691,11 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -24653,44 +24712,72 @@ class Test_TC_ILL_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 : reads max level attribute from DUT\n"); + err = TestReadsMaxLevelAttributeFromDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : sends a Move up command\n"); + err = TestSendsAMoveUpCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : user prompt message\n"); + err = TestUserPromptMessage_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 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_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); + err = TestWait3000ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : reads min level attribute from DUT\n"); + err = TestReadsMinLevelAttributeFromDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates FeatureMap " - "attribute has the value 0\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move down command\n"); + err = TestSendsAMoveDownCommand_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : user prompt message\n"); + err = TestUserPromptMessage_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); + err = TestWait5000ms_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : reads default move rate attribute from DUT\n"); + err = TestReadsDefaultMoveRateAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move up command at default move rate\n"); + err = TestSendsAMoveUpCommandAtDefaultMoveRate_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); + err = TestWait100ms_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : user prompt message\n"); + err = TestUserPromptMessage_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Reset level to 254\n"); + err = TestResetLevelTo254_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 100ms\n"); + err = TestWait100ms_17(); break; } @@ -24727,6 +24814,36 @@ class Test_TC_ILL_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; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -24740,7 +24857,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -24753,23 +24870,22 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSNumber * _Nonnull MaxlevelValue; - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadsMaxLevelAttributeFromDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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); + [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads max level attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + MaxlevelValue = value; } NextTest(); @@ -24778,285 +24894,174 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestSendsAMoveUpCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 constraints : ClusterRevision Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:32U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move up command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestUserPromptMessage_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement 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)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); - 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], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); - } - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "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 levelgarbage: not in length on purpose", + 148); + return UserPrompt("alpha", value); } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestWait3000ms_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::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 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(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("current level", actualValue, MaxlevelValue)); } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull MinlevelValue; - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadsMinLevelAttributeFromDut_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads min level attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + MinlevelValue = value; } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesFeatureMapAttributeHasTheValue0_7() + CHIP_ERROR TestSendsAMoveDownCommand_7() { - 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("alpha", value); - } -}; - -class Test_TC_ILL_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ILL_2_1() - : TestCommandBridge("Test_TC_ILL_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_ILL_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 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 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads MinMeasuredValue attribute from DUT\n"); - err = TestThReadsMinMeasuredValueAttributeFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads MaxMeasuredValue attribute from DUT\n"); - err = TestThReadsMaxMeasuredValueAttributeFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads Tolerance attribute from DUT\n"); - err = TestThReadsToleranceAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads LightSensorType attribute from DUT\n"); - err = TestThReadsLightSensorTypeAttributeFromDut_4(); - break; - } + __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = [NSNumber numberWithUnsignedChar:64U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move down command Error: %@", err); - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - 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; - } + NextTest(); + }]; - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestUserPromptMessage_8() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "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 levelgarbage: not in length on purpose", + 147); + return UserPrompt("alpha", value); } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestWait5000ms_9() { - 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 = 5000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsMinMeasuredValueAttributeFromDut_1() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MinMeasuredValue attribute from DUT 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)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 1U)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("current level", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 1U)); + NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nullable DefaultMoveRateValue; - CHIP_ERROR TestThReadsMaxMeasuredValueAttributeFromDut_2() + CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads MaxMeasuredValue attribute from DUT Error: %@", err); + [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads default move rate attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); if (value != nil) { - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 2U)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + } + { + DefaultMoveRateValue = value; } NextTest(); @@ -25065,59 +25070,100 @@ class Test_TC_ILL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsToleranceAttributeFromDut_3() + CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_12() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads Tolerance attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:255U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"sends a Move up command at default move rate Error: %@", err); - VerifyOrReturn(CheckConstraintType("tolerance", "", "uint16")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsLightSensorTypeAttributeFromDut_4() + CHIP_ERROR TestWait100ms_13() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestIlluminanceMeasurement * cluster = [[CHIPTestIlluminanceMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLightSensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LightSensorType attribute from DUT 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)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("lightSensorType", "", "enum8")); - } + VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, 255U)); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestUserPromptMessage_15() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Physically verify that the device moves at the rate recorded in step 3a and " + "completes moving to its maximum level.garbage: not in length on purpose", + 114); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestResetLevelTo254_16() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams 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); + } }; -class Test_TC_LVL_1_1 : public TestCommandBridge { +class Test_TC_LVL_5_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_1_1() - : TestCommandBridge("Test_TC_LVL_1_1") + Test_TC_LVL_5_1() + : TestCommandBridge("Test_TC_LVL_5_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -25127,7 +25173,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_1_1() {} + ~Test_TC_LVL_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -25135,11 +25181,11 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -25156,38 +25202,56 @@ class Test_TC_LVL_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 : Sending on command\n"); + err = TestSendingOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints : ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to its lowest point\n"); + err = TestPreconditionDutLevelIsSetToItsLowestPoint_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); + err = TestWait3000ms_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 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_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step up command to DUT\n"); + err = TestSendsStepUpCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional global attribute: FeatureMap\n"); - err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 5000ms\n"); + err = TestWait5000ms_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step down command\n"); + err = TestSendsAStepDownCommand_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 4000ms\n"); + err = TestWait4000ms_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Reset level to 254\n"); + err = TestResetLevelTo254_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 100ms\n"); + err = TestWait100ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Sending off command\n"); + err = TestSendingOffCommand_13(); break; } @@ -25221,6 +25285,27 @@ class Test_TC_LVL_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; } // Go on to the next test. @@ -25234,7 +25319,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -25248,137 +25333,172 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestSendingOnCommand_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff 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); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sending on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 5U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestPreconditionDutLevelIsSetToItsLowestPoint_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 constraints : ClusterRevision Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:100U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; + params.optionMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: DUT level is set to its lowest point Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestWait3000ms_3() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 3000UL; + return WaitForMs("alpha", value); + } + NSNumber * _Nonnull CurrentlevelValue; + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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); + [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(CheckConstraintType("currentLevel", "", "uint8")); { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(14))); - 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], 10UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 11UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 12UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 13UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 14UL)); - VerifyOrReturn(CheckValue("", actualValue[12], 15UL)); - VerifyOrReturn(CheckValue("", actualValue[13], 16384UL)); + CurrentlevelValue = value; } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestSendsStepUpCommandToDut_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); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:0U]; + params.stepSize = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; + params.optionMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionOverride = [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 TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestWait5000ms_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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 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("AcceptedCommandList", [actualValue count], static_cast(8))); - 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(CheckConstraintNotValue("currentLevel", value, CurrentlevelValue)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() + CHIP_ERROR TestSendsAStepDownCommand_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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); + __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:64U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; + params.optionMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a Step down command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait4000ms_9() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 4000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl 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("FeatureMap", actualValue, 3UL)); + VerifyOrReturn(CheckValue("current level", actualValue, CurrentlevelValue)); } NextTest(); @@ -25386,35 +25506,82 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } -}; -class Test_TC_LVL_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_2_1() - : TestCommandBridge("Test_TC_LVL_2_1") - , mTestIndex(0) + CHIP_ERROR TestResetLevelTo254_11() { - 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) + CHIPDevice * device = GetDevice("alpha"); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~Test_TC_LVL_2_1() {} + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams 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); - /////////// 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_LVL_2_1\n"); - } + NextTest(); + }]; - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_1\n"); + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_12() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestSendingOffCommand_13() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sending off command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_LVL_6_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_LVL_6_1() + : TestCommandBridge("Test_TC_LVL_6_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_LVL_6_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -25431,68 +25598,48 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reset level to 254\n"); - err = TestResetLevelTo254_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); + err = TestSendingOnCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); - err = TestWait100ms_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: set DUT to lowest point\n"); + err = TestPreconditionSetDutToLowestPoint_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 100ms\n"); + err = TestWait100ms_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the RemainingTime attribute\n"); - err = TestReadsTheRemainingTimeAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Sends a move up command to DUT\n"); + err = TestSendsAMoveUpCommandToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 2000ms\n"); + err = TestWait2000ms_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentFrequency attribute\n"); - err = TestReadsTheCurrentFrequencyAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Sends stop command to DUT\n"); + err = TestSendsStopCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MinFrequency attribute\n"); - err = TestReadsTheMinFrequencyAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); + err = TestReadsCurrentLevelAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxFrequency attribute\n"); - err = TestReadsTheMaxFrequencyAttribute_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reset level to 254\n"); + err = TestResetLevelTo254_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnOffTransitionTime attribute\n"); - err = TestReadsTheOnOffTransitionTimeAttribute_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100ms\n"); + err = TestWait100ms_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnLevel attribute \n"); - err = TestReadsTheOnLevelAttribute_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OnTransitionTime attribute \n"); - err = TestReadsTheOnTransitionTimeAttribute_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute \n"); - err = TestReadsTheOffTransitionTimeAttribute_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute \n"); - err = TestReadsTheDefaultMoveRateAttribute_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the Options attribute \n"); - err = TestReadsTheOptionsAttribute_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the StartUpCurrentLevel attribute \n"); - err = TestReadsTheStartUpCurrentLevelAttribute_16(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Sending off command\n"); + err = TestSendingOffCommand_11(); break; } @@ -25541,21 +25688,6 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -25569,7 +25701,7 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -25583,277 +25715,140 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestResetLevelTo254_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [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_2() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 254)); - } - - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheRemainingTimeAttribute_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeRemainingTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the RemainingTime attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("remaining time", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("remainingTime", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheMinLevelAttribute_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MinLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("min level", actualValue, 1)); - } - - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("minLevel", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("minLevel", [value unsignedCharValue], 1)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheMaxLevelAttribute_6() + CHIP_ERROR TestSendingOnCommand_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MaxLevel attribute Error: %@", err); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sending on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_7() + CHIP_ERROR TestPreconditionSetDutToLowestPoint_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentFrequency attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Precondition: set DUT to lowest point Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("current frequency", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentFrequency", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMinFrequencyAttribute_8() + CHIP_ERROR TestWait100ms_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MinFrequency attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("min frequency", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("minFrequency", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } + NSNumber * _Nonnull CurrentLevelValue; - CHIP_ERROR TestReadsTheMaxFrequencyAttribute_9() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxFrequencyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MaxFrequency attribute 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)); + VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 1U)); { - id actualValue = value; - VerifyOrReturn(CheckValue("max frequency", actualValue, 0U)); + CurrentLevelValue = value; } - VerifyOrReturn(CheckConstraintType("maxFrequency", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_10() + CHIP_ERROR TestSendsAMoveUpCommandToDut_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnOffTransitionTime attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:1U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1U]; + [cluster moveWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a move up command to DUT Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("on off transition time", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnLevelAttribute_11() + CHIP_ERROR TestWait2000ms_6() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_12() + CHIP_ERROR TestSendsStopCommandToDut_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnTransitionTime attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[CHIPLevelControlClusterStopParams alloc] init]; + params.optionMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stopWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends stop command to DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_13() + CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OffTransitionTime attribute 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)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); - } + VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); NextTest(); }]; @@ -25861,67 +25856,47 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_14() + CHIP_ERROR TestResetLevelTo254_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the DefaultMoveRate attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams 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(CheckConstraintType("defaultMoveRate", "", "uint8")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOptionsAttribute_15() + CHIP_ERROR TestWait100ms_10() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("options", actualValue, 0)); - } - - VerifyOrReturn(CheckConstraintType("options", "", "map8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_16() + CHIP_ERROR TestSendingOffCommand_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Sending off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); - } - NextTest(); }]; @@ -25929,11 +25904,11 @@ class Test_TC_LVL_2_1 : public TestCommandBridge { } }; -class Test_TC_LVL_2_2 : public TestCommandBridge { +class Test_TC_MC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_2_2() - : TestCommandBridge("Test_TC_LVL_2_2") + Test_TC_MC_1_1() + : TestCommandBridge("Test_TC_MC_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -25943,7 +25918,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_2_2() {} + ~Test_TC_MC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -25951,11 +25926,11 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -25972,80 +25947,40 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OnOffTransitionTime attribute from the DUT\n"); - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : writes the OnOffTransitionTime attribute on the DUT\n"); - err = TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the OnOffTransitionTime attribute from the DUT\n"); - err = TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3(); + ChipLogProgress(chipTool, + " ***** Test Step 3 : 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_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : writes default value of OnOffTransitionTime attribute\n"); - err = TestWritesDefaultValueOfOnOffTransitionTimeAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the OnLevel attribute from the DUT\n"); - err = TestReadsTheOnLevelAttributeFromTheDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : writes the OnLevel attribute on the DUT\n"); - err = TestWritesTheOnLevelAttributeOnTheDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the OnLevel attribute from the DUT\n"); - err = TestReadsTheOnLevelAttributeFromTheDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the OnTransitionTime attribute from the DUT\n"); - err = TestReadsTheOnTransitionTimeAttributeFromTheDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Writes the OnTransitionTime attribute on the DUT\n"); - err = TestWritesTheOnTransitionTimeAttributeOnTheDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnTransitionTime attribute from the DUT\n"); - err = TestReadsTheOnTransitionTimeAttributeFromTheDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OffTransitionTime attribute from the DUT\n"); - err = TestReadsTheOffTransitionTimeAttributeFromTheDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Writes the OffTransitionTime attribute on the DUT\n"); - err = TestWritesTheOffTransitionTimeAttributeOnTheDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute from the DUT\n"); - err = TestReadsTheOffTransitionTimeAttributeFromTheDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute from the DUT\n"); - err = TestReadsTheDefaultMoveRateAttributeFromTheDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Writes the DefaultMoveRate attribute on the DUT\n"); - err = TestWritesTheDefaultMoveRateAttributeOnTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads the DefaultMoveRate attribute from the DUT\n"); - err = TestReadsTheDefaultMoveRateAttributeFromTheDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : writes the StartUpCurrentLevel attribute on the DUT\n"); - err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_19(); + ChipLogProgress(chipTool, + " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates either " + "value 0 or throws a general error if the attribute is not supported\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesEitherValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_6(); break; } @@ -26079,45 +26014,6 @@ class Test_TC_LVL_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; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -26131,7 +26027,7 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -26145,291 +26041,289 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnOffTransitionTime attribute from the DUT 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("on off transition time", actualValue, 0U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheOnOffTransitionTimeAttributeOnTheDut_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:10U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes the OnOffTransitionTime attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttributeFromTheDut_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnOffTransitionTime 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)); { id actualValue = value; - VerifyOrReturn(CheckValue("on off transition time", actualValue, 10U)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesDefaultValueOfOnOffTransitionTimeAttribute_4() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onOffTransitionTimeArgument; - onOffTransitionTimeArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeOnOffTransitionTimeWithValue:onOffTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes default value of OnOffTransitionTime attribute 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 TestReadsTheOnLevelAttributeFromTheDut_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnLevel attribute from the DUT 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)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheOnLevelAttributeOnTheDut_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onLevelArgument; - onLevelArgument = [NSNumber numberWithUnsignedChar:254]; - [cluster writeAttributeOnLevelWithValue:onLevelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheOnLevelAttributeFromTheDut_7() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnLevel attribute from the DUT 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(CheckValueNonNull("on level", actualValue)); - VerifyOrReturn(CheckValue("on level", actualValue, 254)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_8() + CHIP_ERROR + TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesEitherValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_6() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); - } - - 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 TestWritesTheOnTransitionTimeAttributeOnTheDut_9() +class Test_TC_MC_1_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_1_2() + : TestCommandBridge("Test_TC_MC_1_2") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id onTransitionTimeArgument; - onTransitionTimeArgument = [NSNumber numberWithUnsignedShort:100U]; - [cluster writeAttributeOnTransitionTimeWithValue:onTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the OnTransitionTime attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_MC_1_2() {} - CHIP_ERROR TestReadsTheOnTransitionTimeAttributeFromTheDut_10() + /////////// TestCommand Interface ///////// + void NextTest() override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeOnTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OnTransitionTime attribute from the DUT Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_2\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("on transition time", actualValue)); - VerifyOrReturn(CheckValue("on transition time", actualValue, 100U)); - } - if (value != nil) { + Wait(); - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + // 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 constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; } + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : 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_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"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress( + chipTool, " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7(); + break; + } - NextTest(); - }]; - - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadsTheOffTransitionTimeAttributeFromTheDut_11() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OffTransitionTime attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); - } - - 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; + 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; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestWritesTheOffTransitionTimeAttributeOnTheDut_12() + chip::System::Clock::Timeout GetWaitDuration() const override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id offTransitionTimeArgument; - offTransitionTimeArgument = [NSNumber numberWithUnsignedShort:100U]; - [cluster writeAttributeOffTransitionTimeWithValue:offTransitionTimeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the OffTransitionTime attribute on the DUT Error: %@", err); + 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 = 8; - 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 TestReadsTheOffTransitionTimeAttributeFromTheDut_13() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OffTransitionTime attribute from the DUT 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(CheckValueNonNull("off transition time", actualValue)); - VerifyOrReturn(CheckValue("off transition time", actualValue, 100U)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } NextTest(); @@ -26438,155 +26332,124 @@ class Test_TC_LVL_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_14() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the DefaultMoveRate attribute from the DUT Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNonNull("default move rate", actualValue)); - VerifyOrReturn(CheckValue("default move rate", actualValue, 50)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); - } - + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheDefaultMoveRateAttributeOnTheDut_15() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id defaultMoveRateArgument; - defaultMoveRateArgument = [NSNumber numberWithUnsignedChar:100]; - [cluster writeAttributeDefaultMoveRateWithValue:defaultMoveRateArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the DefaultMoveRate attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheDefaultMoveRateAttributeFromTheDut_16() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the DefaultMoveRate 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)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("default move rate", actualValue)); - VerifyOrReturn(CheckValue("default move rate", actualValue, 100)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_17() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT 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)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_18() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id startUpCurrentLevelArgument; - startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:254]; - [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_19() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads the StartUpCurrentLevel attribute from the DUT 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(CheckValueNonNull("start up current level", actualValue)); - VerifyOrReturn(CheckValue("start up current level", actualValue, 254)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpCurrentLevel", "", "uint8")); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_LVL_3_1 : public TestCommandBridge { +class Test_TC_MC_1_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_3_1() - : TestCommandBridge("Test_TC_LVL_3_1") + Test_TC_MC_1_3() + : TestCommandBridge("Test_TC_MC_1_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -26596,7 +26459,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_3_1() {} + ~Test_TC_MC_1_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -26604,11 +26467,11 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -26625,64 +26488,56 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : 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_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait 100ms\n"); - err = TestWait100ms_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 11000 second\n"); - err = TestWait11000Second_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : reads On Off Transition Time attribute from DUT\n"); - err = TestReadsOnOffTransitionTimeAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : sends a Move to level command\n"); - err = TestSendsAMoveToLevelCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reset level to 254\n"); - err = TestResetLevelTo254_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); - err = TestWait100ms_15(); + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read attribute Feature map and verify that DUT response indicates that the FeatureMap " + "attribute has bit 0 set to 1 if the DUT supports the Application Platform feature (PICS_AP_S is true).\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadAttributeFeatureMapAndVerifyThatDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheApplicationPlatformFeaturePicsApSIsTrue_7(); break; } @@ -26719,30 +26574,6 @@ class Test_TC_LVL_3_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; } // Go on to the next test. @@ -26756,7 +26587,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -26770,270 +26601,161 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from DUT 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)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheMinLevelAttribute_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MinLevel attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheMaxLevelAttribute_3() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the MaxLevel attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move to level command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_5() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_6() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from 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)); { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, 64)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveToLevelCommand_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:100]; - params.transitionTime = [NSNumber numberWithUnsignedShort:100U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move to level command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait11000Second_8() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 11000UL; - 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 TestReadsCurrentLevelAttributeFromDut_9() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from DUT 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("current level", actualValue, 100)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffTransitionTimeAttributeFromDut_10() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffTransitionTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads On Off Transition Time attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("onOffTransitionTime", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendsAMoveToLevelCommand_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:128]; - params.transitionTime = [NSNumber numberWithUnsignedShort:65535U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move to level command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_12() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from DUT 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("current level", actualValue, 128)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_14() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [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_15() + CHIP_ERROR + TestReadAttributeFeatureMapAndVerifyThatDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheApplicationPlatformFeaturePicsApSIsTrue_7() { - 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); } }; -class Test_TC_LVL_4_1 : public TestCommandBridge { +class Test_TC_MC_1_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_4_1() - : TestCommandBridge("Test_TC_LVL_4_1") + Test_TC_MC_1_4() + : TestCommandBridge("Test_TC_MC_1_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -27043,7 +26765,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_4_1() {} + ~Test_TC_MC_1_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -27051,11 +26773,11 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_4_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_4_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -27072,72 +26794,48 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : reads max level attribute from DUT\n"); - err = TestReadsMaxLevelAttributeFromDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : sends a Move up command\n"); - err = TestSendsAMoveUpCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : user prompt message\n"); - err = TestUserPromptMessage_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 3000ms\n"); - err = TestWait3000ms_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : 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_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : reads min level attribute from DUT\n"); - err = TestReadsMinLevelAttributeFromDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : sends a Move down command\n"); - err = TestSendsAMoveDownCommand_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : user prompt message\n"); - err = TestUserPromptMessage_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 5000ms\n"); - err = TestWait5000ms_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : reads default move rate attribute from DUT\n"); - err = TestReadsDefaultMoveRateAttributeFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : sends a Move up command at default move rate\n"); - err = TestSendsAMoveUpCommandAtDefaultMoveRate_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); - err = TestWait100ms_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : user prompt message\n"); - err = TestUserPromptMessage_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reset level to 254\n"); - err = TestResetLevelTo254_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 100ms\n"); - err = TestWait100ms_17(); + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read attribute Feature map and Verify that the DUT response indicates that the FeatureMap " + "attribute has bit 0 set to 1 if the DUT supports the Name Updates feature PICS_NU_S is true\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadAttributeFeatureMapAndVerifyThatTheDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheNameUpdatesFeaturePicsNuSIsTrue_7(); break; } @@ -27174,36 +26872,6 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -27217,7 +26885,7 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -27230,22 +26898,21 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - NSNumber * _Nonnull MaxlevelValue; - CHIP_ERROR TestReadsMaxLevelAttributeFromDut_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMaxLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads max level attribute from DUT 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)); - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); { - MaxlevelValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } NextTest(); @@ -27254,276 +26921,129 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommand_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:32]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move up command Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestUserPromptMessage_3() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "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 levelgarbage: not in length on purpose", - 148); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestWait3000ms_4() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_5() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from 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)); { id actualValue = value; - VerifyOrReturn(CheckValue("current level", actualValue, MaxlevelValue)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull MinlevelValue; - - CHIP_ERROR TestReadsMinLevelAttributeFromDut_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads min level attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("minLevel", "", "uint8")); - { - MinlevelValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveDownCommand_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1]; - params.rate = [NSNumber numberWithUnsignedChar:64]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move down command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestUserPromptMessage_8() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "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 levelgarbage: not in length on purpose", - 147); + value.message = chip::Span("Please enter 'y' for successgarbage: not 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 TestWait5000ms_9() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from DUT 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("current level", actualValue, 1)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); } - VerifyOrReturn(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 1)); - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nullable DefaultMoveRateValue; - CHIP_ERROR TestReadsDefaultMoveRateAttributeFromDut_11() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeDefaultMoveRateWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads default move rate attribute from DUT 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)); - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); - } { - DefaultMoveRateValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_12() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:255]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"sends a Move up command at default move rate Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_13() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_14() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads CurrentLevel attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintNotValue("currentLevel", value, 255)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestUserPromptMessage_15() + CHIP_ERROR + TestReadAttributeFeatureMapAndVerifyThatTheDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheNameUpdatesFeaturePicsNuSIsTrue_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Physically verify that the device moves at the rate recorded in step 3a and " - "completes moving to its maximum level.garbage: not in length on purpose", - 114); + value.message = chip::Span("Please enter 'y' for successgarbage: not 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 TestResetLevelTo254_16() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [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); - } }; -class Test_TC_LVL_5_1 : public TestCommandBridge { +class Test_TC_MC_1_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_5_1() - : TestCommandBridge("Test_TC_LVL_5_1") + Test_TC_MC_1_5() + : TestCommandBridge("Test_TC_MC_1_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -27533,7 +27053,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_5_1() {} + ~Test_TC_MC_1_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -27541,11 +27061,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -27562,56 +27082,38 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); - err = TestSendingOnCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: DUT level is set to its lowest point\n"); - err = TestPreconditionDutLevelIsSetToItsLowestPoint_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read FeatureMap attribute from the DUT\n"); + err = TestReadFeatureMapAttributeFromTheDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 3000ms\n"); - err = TestWait3000ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : 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_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends step up command to DUT\n"); - err = TestSendsStepUpCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 5000ms\n"); - err = TestWait5000ms_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Sends a Step down command\n"); - err = TestSendsAStepDownCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 4000ms\n"); - err = TestWait4000ms_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads current level attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reset level to 254\n"); - err = TestResetLevelTo254_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 100ms\n"); - err = TestWait100ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Sending off command\n"); - err = TestSendingOffCommand_13(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -27645,27 +27147,6 @@ class Test_TC_LVL_5_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; } // Go on to the next test. @@ -27679,7 +27160,7 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -27693,221 +27174,131 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendingOnCommand_1() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending on command Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionDutLevelIsSetToItsLowestPoint_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; - params.stepSize = [NSNumber numberWithUnsignedChar:100]; - params.transitionTime = [NSNumber numberWithUnsignedShort:20U]; - params.optionMask = [NSNumber numberWithUnsignedChar:0]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster stepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: DUT level is set to its lowest point Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait3000ms_3() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull CurrentlevelValue; - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan 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); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); { - CurrentlevelValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsStepUpCommandToDut_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0]; - params.stepSize = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; - params.optionMask = [NSNumber numberWithUnsignedChar:0]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0]; - [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 TestWait5000ms_6() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_7() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan 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); + [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(CheckConstraintNotValue("currentLevel", value, CurrentlevelValue)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAStepDownCommand_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterStepParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1]; - params.stepSize = [NSNumber numberWithUnsignedChar:64]; - params.transitionTime = [NSNumber numberWithUnsignedShort:2U]; - params.optionMask = [NSNumber numberWithUnsignedChar:0]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster stepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a Step down command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait4000ms_9() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 4000UL; - 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 TestReadsCurrentLevelAttributeFromDut_10() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan 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); + [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("current level", actualValue, CurrentlevelValue)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [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_12() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestSendingOffCommand_13() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending 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("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -27915,11 +27306,11 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { } }; -class Test_TC_LVL_6_1 : public TestCommandBridge { +class Test_TC_MC_1_6 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_LVL_6_1() - : TestCommandBridge("Test_TC_LVL_6_1") + Test_TC_MC_1_6() + : TestCommandBridge("Test_TC_MC_1_6") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -27929,7 +27320,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_LVL_6_1() {} + ~Test_TC_MC_1_6() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -27937,11 +27328,11 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_LVL_6_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_6\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_LVL_6_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_6\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -27958,48 +27349,57 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Sending on command\n"); - err = TestSendingOnCommand_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Precondition: set DUT to lowest point\n"); - err = TestPreconditionSetDutToLowestPoint_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait 100ms\n"); - err = TestWait100ms_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : 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_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Sends a move up command to DUT\n"); - err = TestSendsAMoveUpCommandToDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 2000ms\n"); - err = TestWait2000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Sends stop command to DUT\n"); - err = TestSendsStopCommandToDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads CurrentLevel attribute from DUT\n"); - err = TestReadsCurrentLevelAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reset level to 254\n"); - err = TestResetLevelTo254_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 100ms\n"); - err = TestWait100ms_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Sending off command\n"); - err = TestSendingOffCommand_11(); + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response values based on " + "feature/PICS support Bit 0 - Set to 1 if the DUT supports Channel Lists (PICS_CL_S is true) Bit 1 - Set to 1 if " + "the DUT supports Lineup Info (PICS_LI_S is true)\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsChannelListsPicsClSIsTrueBit1SetTo1IfTheDutSupportsLineupInfoPicsLiSIsTrue_7(); break; } @@ -28036,18 +27436,6 @@ class Test_TC_LVL_6_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; } // Go on to the next test. @@ -28061,7 +27449,7 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -28075,200 +27463,138 @@ class Test_TC_LVL_6_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendingOnCommand_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending 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("ClusterRevision", actualValue, 1U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestPreconditionSetDutToLowestPoint_2() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:0]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveToLevelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Precondition: set DUT to lowest point Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_3() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull CurrentLevelValue; - - CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_4() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from 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(CheckConstraintMinValue("currentLevel", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("currentLevel", [value unsignedCharValue], 1)); { - CurrentLevelValue = value; + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(8))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65533UL)); } + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsAMoveUpCommandToDut_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0]; - params.rate = [NSNumber numberWithUnsignedChar:1]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [cluster moveWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a move up command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait2000ms_6() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestSendsStopCommandToDut_7() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterStopParams alloc] init]; - params.optionMask = [NSNumber numberWithUnsignedChar:0]; - params.optionOverride = [NSNumber numberWithUnsignedChar:0]; - [cluster stopWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends stop command to DUT 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 TestReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads CurrentLevel attribute from DUT 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(CheckConstraintNotValue("currentLevel", value, CurrentLevelValue)); - + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestResetLevelTo254_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; - params.level = [NSNumber numberWithUnsignedChar:254]; - params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; - params.optionMask = [NSNumber numberWithUnsignedChar:1]; - params.optionOverride = [NSNumber numberWithUnsignedChar:1]; - [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_10() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestSendingOffCommand_11() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Sending 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)); + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR + TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsChannelListsPicsClSIsTrueBit1SetTo1IfTheDutSupportsLineupInfoPicsLiSIsTrue_7() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } }; -class Test_TC_MC_1_1 : public TestCommandBridge { +class Test_TC_MC_1_7 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_1() - : TestCommandBridge("Test_TC_MC_1_1") + Test_TC_MC_1_7() + : TestCommandBridge("Test_TC_MC_1_7") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -28278,7 +27604,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_1() {} + ~Test_TC_MC_1_7() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -28286,11 +27612,11 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_7\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_7\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -28312,6 +27638,10 @@ class Test_TC_MC_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: @@ -28326,21 +27656,30 @@ class Test_TC_MC_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response indicates either " - "value 0 or throws a general error if the attribute is not supported\n"); + " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT values based on feature/PICS " + "support:Bit 0 - Set to 1 if the DUT supports Advanced Seek (PICS_ADVANCEDSEEK is true) Bit 1 - Set to 1 if the " + "DUT supports Variable Speed (PICS_VARIABLESPEED is true)\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesEitherValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_6(); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsAdvancedSeekPicsAdvancedseekIsTrueBit1SetTo1IfTheDutSupportsVariableSpeedPicsVariablespeedIsTrue_6(); break; } @@ -28404,7 +27743,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -28427,7 +27766,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -28437,12 +27776,19 @@ class Test_TC_MC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(12))); + 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], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[10], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[11], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -28464,7 +27810,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -28474,8 +27820,18 @@ class Test_TC_MC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(11))); 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], 11UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -28488,7 +27844,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -28498,7 +27854,8 @@ class Test_TC_MC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 10UL)); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); @@ -28509,7 +27866,7 @@ class Test_TC_MC_1_1 : public TestCommandBridge { } CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesEitherValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_6() + TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsAdvancedSeekPicsAdvancedseekIsTrueBit1SetTo1IfTheDutSupportsVariableSpeedPicsVariablespeedIsTrue_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -28519,11 +27876,11 @@ class Test_TC_MC_1_1 : public TestCommandBridge { } }; -class Test_TC_MC_1_2 : public TestCommandBridge { +class Test_TC_MC_1_8 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_2() - : TestCommandBridge("Test_TC_MC_1_2") + Test_TC_MC_1_8() + : TestCommandBridge("Test_TC_MC_1_8") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -28533,7 +27890,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_2() {} + ~Test_TC_MC_1_8() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -28541,11 +27898,11 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_8\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_8\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -28589,6 +27946,10 @@ class Test_TC_MC_1_2 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: @@ -28600,13 +27961,14 @@ class Test_TC_MC_1_2 : public TestCommandBridge { err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT has bit 1 set to 1 if the " + "device supports Name Updates PICS_NAMEUPDATES is true\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7(); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_7(); break; } @@ -28673,7 +28035,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -28695,7 +28057,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -28713,7 +28075,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -28723,12 +28085,14 @@ class Test_TC_MC_1_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -28750,7 +28114,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -28774,7 +28138,7 @@ class Test_TC_MC_1_2 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -28795,7 +28159,8 @@ class Test_TC_MC_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_7() + CHIP_ERROR + TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -28805,11 +28170,11 @@ class Test_TC_MC_1_2 : public TestCommandBridge { } }; -class Test_TC_MC_1_3 : public TestCommandBridge { +class Test_TC_MC_1_9 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_3() - : TestCommandBridge("Test_TC_MC_1_3") + Test_TC_MC_1_9() + : TestCommandBridge("Test_TC_MC_1_9") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -28819,7 +28184,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_3() {} + ~Test_TC_MC_1_9() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -28827,11 +28192,11 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_9\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_9\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -28875,10 +28240,6 @@ class Test_TC_MC_1_3 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: @@ -28891,13 +28252,13 @@ class Test_TC_MC_1_3 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Read attribute Feature map and verify that DUT response indicates that the FeatureMap " - "attribute has bit 0 set to 1 if the DUT supports the Application Platform feature (PICS_AP_S is true).\n"); + " ***** Test Step 7 : Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a " + "general error if the attribute is not supported..\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadAttributeFeatureMapAndVerifyThatDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheApplicationPlatformFeaturePicsApSIsTrue_7(); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7(); break; } @@ -28964,9 +28325,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -28988,9 +28347,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -29008,9 +28365,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29049,9 +28404,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29061,10 +28414,8 @@ class Test_TC_MC_1_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -29077,9 +28428,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29090,7 +28439,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); @@ -29101,7 +28450,7 @@ class Test_TC_MC_1_3 : public TestCommandBridge { } CHIP_ERROR - TestReadAttributeFeatureMapAndVerifyThatDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheApplicationPlatformFeaturePicsApSIsTrue_7() + TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29111,11 +28460,11 @@ class Test_TC_MC_1_3 : public TestCommandBridge { } }; -class Test_TC_MC_1_4 : public TestCommandBridge { +class Test_TC_MC_1_10 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_4() - : TestCommandBridge("Test_TC_MC_1_4") + Test_TC_MC_1_10() + : TestCommandBridge("Test_TC_MC_1_10") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29125,7 +28474,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_4() {} + ~Test_TC_MC_1_10() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29133,11 +28482,11 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_10\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_10\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29158,8 +28507,8 @@ class Test_TC_MC_1_4 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_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"); @@ -29181,21 +28530,19 @@ class Test_TC_MC_1_4 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } 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 attribute Feature map and Verify that the DUT response indicates that the FeatureMap " - "attribute has bit 0 set to 1 if the DUT supports the Name Updates feature PICS_NU_S is true\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadAttributeFeatureMapAndVerifyThatTheDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheNameUpdatesFeaturePicsNuSIsTrue_7(); + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -29229,9 +28576,6 @@ class Test_TC_MC_1_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; } // Go on to the next test. @@ -29245,7 +28589,7 @@ class Test_TC_MC_1_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -29262,7 +28606,9 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -29275,24 +28621,32 @@ class Test_TC_MC_1_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read FeatureMap attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; @@ -29302,7 +28656,9 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29312,14 +28668,17 @@ class Test_TC_MC_1_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); + VerifyOrReturn(CheckValue("", actualValue[0], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 4UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 5UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 6UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 7UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -29341,7 +28700,9 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29351,11 +28712,9 @@ class Test_TC_MC_1_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -29368,7 +28727,9 @@ class Test_TC_MC_1_4 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29378,7 +28739,8 @@ class Test_TC_MC_1_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 2UL)); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); @@ -29387,23 +28749,13 @@ class Test_TC_MC_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR - TestReadAttributeFeatureMapAndVerifyThatTheDutResponseIndicatesThatTheFeatureMapAttributeHasBit0SetTo1IfTheDutSupportsTheNameUpdatesFeaturePicsNuSIsTrue_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_MC_1_5 : public TestCommandBridge { +class Test_TC_MC_1_11 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_5() - : TestCommandBridge("Test_TC_MC_1_5") + Test_TC_MC_1_11() + : TestCommandBridge("Test_TC_MC_1_11") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29413,7 +28765,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_5() {} + ~Test_TC_MC_1_11() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29421,11 +28773,11 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_11\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_11\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29446,39 +28798,53 @@ class Test_TC_MC_1_5 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_2(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; - case 3: + case 4: ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 4 : 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_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 global attribute: AcceptedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read FeatureMap attribute from the DUT values based on feature/PICS support: Bit 0 - Set to " + "1 if the DUT supports Content Search (PICS_CONTENTSEARCH is true) Bit 1 - Set to 1 if the DUT supports URL " + "Playback (PICS_URLPLAYBACK is true)\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6(); + err = TestReadFeatureMapAttributeFromTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsContentSearchPicsContentsearchIsTrueBit1SetTo1IfTheDutSupportsUrlPlaybackPicsUrlplaybackIsTrue_7(); break; } @@ -29512,6 +28878,9 @@ class Test_TC_MC_1_5 : 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. @@ -29525,7 +28894,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -29542,7 +28911,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -29555,6 +28924,23 @@ class Test_TC_MC_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher 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 constraints: ClusterRevision Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; @@ -29562,10 +28948,10 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29575,13 +28961,14 @@ class Test_TC_MC_1_5 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(6))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65533UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -29591,7 +28978,7 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29600,10 +28987,10 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29613,7 +29000,8 @@ class Test_TC_MC_1_5 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); } VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); @@ -29623,10 +29011,10 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestWakeOnLan * cluster = [[CHIPTestWakeOnLan alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29636,7 +29024,8 @@ class Test_TC_MC_1_5 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); } VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); @@ -29646,7 +29035,8 @@ class Test_TC_MC_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6() + CHIP_ERROR + TestReadFeatureMapAttributeFromTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsContentSearchPicsContentsearchIsTrueBit1SetTo1IfTheDutSupportsUrlPlaybackPicsUrlplaybackIsTrue_7() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29656,11 +29046,11 @@ class Test_TC_MC_1_5 : public TestCommandBridge { } }; -class Test_TC_MC_1_6 : public TestCommandBridge { +class Test_TC_MC_1_12 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_6() - : TestCommandBridge("Test_TC_MC_1_6") + Test_TC_MC_1_12() + : TestCommandBridge("Test_TC_MC_1_12") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29670,7 +29060,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_6() {} + ~Test_TC_MC_1_12() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29678,11 +29068,11 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_12\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_12\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29703,53 +29093,43 @@ class Test_TC_MC_1_6 : public TestCommandBridge { err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: ChipLogProgress(chipTool, - " ***** Test Step 4 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 3 : 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_4(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT response values based on " - "feature/PICS support Bit 0 - Set to 1 if the DUT supports Channel Lists (PICS_CL_S is true) Bit 1 - Set to 1 if " - "the DUT supports Lineup Info (PICS_LI_S is true)\n"); + case 6: + ChipLogProgress( + chipTool, " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); if (ShouldSkip("PICS_USER_PROMPT")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsChannelListsPicsClSIsTrueBit1SetTo1IfTheDutSupportsLineupInfoPicsLiSIsTrue_7(); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6(); break; } @@ -29783,9 +29163,6 @@ class Test_TC_MC_1_6 : 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. @@ -29799,7 +29176,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -29816,7 +29193,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { @@ -29829,23 +29206,6 @@ class Test_TC_MC_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel 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 constraints: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; @@ -29853,10 +29213,10 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29866,15 +29226,12 @@ class Test_TC_MC_1_6 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(8))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65533UL)); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -29884,7 +29241,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29893,10 +29250,10 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29904,6 +29261,14 @@ class Test_TC_MC_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 3UL)); + } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; @@ -29911,10 +29276,10 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { @@ -29922,6 +29287,12 @@ class Test_TC_MC_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -29929,8 +29300,7 @@ class Test_TC_MC_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponseValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsChannelListsPicsClSIsTrueBit1SetTo1IfTheDutSupportsLineupInfoPicsLiSIsTrue_7() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -29940,11 +29310,11 @@ class Test_TC_MC_1_6 : public TestCommandBridge { } }; -class Test_TC_MC_1_7 : public TestCommandBridge { +class Test_TC_MC_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_7() - : TestCommandBridge("Test_TC_MC_1_7") + Test_TC_MC_2_1() + : TestCommandBridge("Test_TC_MC_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -29954,7 +29324,7 @@ class Test_TC_MC_1_7 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_7() {} + ~Test_TC_MC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -29962,11 +29332,11 @@ class Test_TC_MC_1_7 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -29983,43 +29353,8 @@ class Test_TC_MC_1_7 : public TestCommandBridge { 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: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_4(); - break; - case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Read FeatureMap attribute from the DUT and Verify that the DUT values based on feature/PICS " - "support:Bit 0 - Set to 1 if the DUT supports Advanced Seek (PICS_ADVANCEDSEEK is true) Bit 1 - Set to 1 if the " - "DUT supports Variable Speed (PICS_VARIABLESPEED is true)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsAdvancedSeekPicsAdvancedseekIsTrueBit1SetTo1IfTheDutSupportsVariableSpeedPicsVariablespeedIsTrue_5(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends Sleep command to DUT\n"); + err = TestThSendsSleepCommandToDut_1(); break; } @@ -30038,18 +29373,6 @@ class Test_TC_MC_1_7 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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; } // Go on to the next test. @@ -30063,7 +29386,7 @@ class Test_TC_MC_1_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 2; chip::Optional mNodeId; chip::Optional mCluster; @@ -30077,138 +29400,175 @@ class Test_TC_MC_1_7 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThSendsSleepCommandToDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestLowPower * cluster = [[CHIPTestLowPower 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); + [cluster sleepWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends Sleep command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() +class Test_TC_MC_3_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_3_2() + : TestCommandBridge("Test_TC_MC_3_2") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback 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 global attribute: AttributeList Error: %@", err); + ~Test_TC_MC_3_2() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(12))); - 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], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 65533UL)); - } + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_2\n"); + } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_2\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 : TH sends CEC Settings Keys(0x0A) to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsCecSettingsKeys0x0AToDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends CEC Home Keys(0x09) to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsCecHomeKeys0x09ToDut_2(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_3() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback 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; + } - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList 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)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(11))); - 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], 11UL)); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 3; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - 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 TestReadTheGlobalAttributeGeneratedCommandList_4() + CHIP_ERROR TestThSendsCecSettingsKeys0x0AToDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaPlayback * cluster = [[CHIPTestMediaPlayback alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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)); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:10U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends CEC Settings Keys(0x0A) to DUT Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 10UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsAdvancedSeekPicsAdvancedseekIsTrueBit1SetTo1IfTheDutSupportsVariableSpeedPicsVariablespeedIsTrue_5() + CHIP_ERROR TestThSendsCecHomeKeys0x09ToDut_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends CEC Home Keys(0x09) to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_MC_1_8 : public TestCommandBridge { +class Test_TC_MC_3_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_8() - : TestCommandBridge("Test_TC_MC_1_8") + Test_TC_MC_3_3() + : TestCommandBridge("Test_TC_MC_3_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30218,7 +29578,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_8() {} + ~Test_TC_MC_3_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30226,11 +29586,11 @@ class Test_TC_MC_1_8 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30247,56 +29607,76 @@ class Test_TC_MC_1_8 : 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 : Send Numbers1\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendNumbers1_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Send Numbers2\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendNumbers2_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Send Numbers3\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_3(); + err = TestSendNumbers3_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 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 4 : Send Numbers4\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestSendNumbers4_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 5 : Send Numbers5\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestSendNumbers5_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : Send Numbers6\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestSendNumbers6_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and Verify that the DUT has bit 1 set to 1 if the " - "device supports Name Updates PICS_NAMEUPDATES is true\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Send Numbers7\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_7(); + err = TestSendNumbers7_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Send Numbers8\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendNumbers8_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Send Numbers9\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendNumbers9_9(); break; } @@ -30333,6 +29713,12 @@ class Test_TC_MC_1_8 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30346,7 +29732,7 @@ class Test_TC_MC_1_8 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -30360,149 +29746,192 @@ class Test_TC_MC_1_8 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestSendNumbers1_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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)); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:33U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers1 Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestSendNumbers2_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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 constraints: ClusterRevision Error: %@", err); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:34U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers2 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestSendNumbers3_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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)); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:35U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers3 Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestSendNumbers4_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:36U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers4 Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestSendNumbers5_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:37U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers5 Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); - } + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendNumbers6_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:38U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers6 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutHasBit1SetTo1IfTheDeviceSupportsNameUpdatesPicsNameupdatesIsTrue_7() + CHIP_ERROR TestSendNumbers7_7() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:39U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers7 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendNumbers8_8() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:40U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers8 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendNumbers9_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:41U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Send Numbers9 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_MC_1_9 : public TestCommandBridge { +class Test_TC_MC_3_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_9() - : TestCommandBridge("Test_TC_MC_1_9") + Test_TC_MC_3_4() + : TestCommandBridge("Test_TC_MC_3_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30512,7 +29941,7 @@ class Test_TC_MC_1_9 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_9() {} + ~Test_TC_MC_3_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30520,11 +29949,11 @@ class Test_TC_MC_1_9 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30541,52 +29970,84 @@ class Test_TC_MC_1_9 : 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 sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsSameKeyPadInputCodesToDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsSameKeyPadInputCodesToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends same KeyPad input codes to DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_3(); + err = TestThSendsSameKeyPadInputCodesToDut_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 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 4 : TH sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); + err = TestThSendsSameKeyPadInputCodesToDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsSameKeyPadInputCodesToDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends same KeyPad input codes to DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + err = TestThSendsSameKeyPadInputCodesToDut_6(); break; case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a " - "general error if the attribute is not supported..\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7(); + err = TestThSendsSameKeyPadInputCodesToDut_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsSameKeyPadInputCodesToDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsSameKeyPadInputCodesToDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends same KeyPad input codes to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsSameKeyPadInputCodesToDut_10(); break; } @@ -30623,6 +30084,15 @@ class Test_TC_MC_1_9 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -30636,7 +30106,7 @@ class Test_TC_MC_1_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -30650,149 +30120,212 @@ class Test_TC_MC_1_9 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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)); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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 constraints: ClusterRevision Error: %@", err); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); - } + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_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); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - } + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_7() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput 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); + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); - } + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7() + CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; + params.keyCode = [NSNumber numberWithUnsignedChar:9U]; + [cluster sendKeyWithParams:params + completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_MC_1_10 : public TestCommandBridge { +class Test_TC_MC_3_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_10() - : TestCommandBridge("Test_TC_MC_1_10") + Test_TC_MC_3_5() + : TestCommandBridge("Test_TC_MC_3_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -30802,7 +30335,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_10() {} + ~Test_TC_MC_3_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -30810,11 +30343,11 @@ class Test_TC_MC_1_10 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_10\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_10\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -30831,56 +30364,8 @@ class Test_TC_MC_1_10 : public TestCommandBridge { 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 constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 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_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT and verify response has the value 0 or throws a " - "general error if the attribute is not supported..\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read CatalogList attribute.\n"); + err = TestReadCatalogListAttribute_1(); break; } @@ -30899,24 +30384,6 @@ class Test_TC_MC_1_10 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - 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. @@ -30930,7 +30397,7 @@ class Test_TC_MC_1_10 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 2; chip::Optional mNodeId; chip::Optional mCluster; @@ -30944,166 +30411,156 @@ class Test_TC_MC_1_10 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestReadCatalogListAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher 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); + [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read CatalogList attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - + VerifyOrReturn(CheckConstraintType("catalogList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() +class Test_TC_MC_3_6 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_MC_3_6() + : TestCommandBridge("Test_TC_MC_3_6") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - 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 TestReadTheGlobalAttributeAttributeList_3() + ~Test_TC_MC_3_6() {} + + /////////// TestCommand Interface ///////// + void NextTest() override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_6\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(13))); - 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], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[9], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[10], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[11], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[12], 65533UL)); - } + Wait(); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - 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 Current App ID attribute.\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadCurrentAppIdAttribute_1(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("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; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + chip::System::Clock::Timeout GetWaitDuration() const override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - 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 TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestReadCurrentAppIdAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher 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 readAttributeCurrentAppWithCompletionHandler:^( + CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read Current App ID attribute. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 2UL)); + VerifyOrReturn(CheckValueNull("CurrentApp", actualValue)); + } + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentApp", "", "ApplicationEP")); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutAndVerifyResponseHasTheValue0OrThrowsAGeneralErrorIfTheAttributeIsNotSupported_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; -class Test_TC_MC_1_11 : public TestCommandBridge { +class Test_TC_MC_3_7 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_11() - : TestCommandBridge("Test_TC_MC_1_11") + Test_TC_MC_3_7() + : TestCommandBridge("Test_TC_MC_3_7") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31113,7 +30570,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_11() {} + ~Test_TC_MC_3_7() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31121,11 +30578,11 @@ class Test_TC_MC_1_11 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_11\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_7\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_11\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_7\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31142,57 +30599,29 @@ class Test_TC_MC_1_11 : public TestCommandBridge { 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 constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Launch an app with the provided a application ID\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 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_4(); + err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); + case 2: + ChipLogProgress( + chipTool, " ***** Test Step 2 : TH sends a LaunchApp command to DUT to launch an app which is not available\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + err = TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Launch an app with the provided a application ID\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); - break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read FeatureMap attribute from the DUT values based on feature/PICS support: Bit 0 - Set to " - "1 if the DUT supports Content Search (PICS_CONTENTSEARCH is true) Bit 1 - Set to 1 if the DUT supports URL " - "Playback (PICS_URLPLAYBACK is true)\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsContentSearchPicsContentsearchIsTrueBit1SetTo1IfTheDutSupportsUrlPlaybackPicsUrlplaybackIsTrue_7(); + err = TestLaunchAnAppWithTheProvidedAApplicationId_3(); break; } @@ -31217,18 +30646,6 @@ class Test_TC_MC_1_11 : 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. @@ -31242,7 +30659,7 @@ class Test_TC_MC_1_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -31256,149 +30673,129 @@ class Test_TC_MC_1_11 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher 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(); - }]; + __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - return CHIP_NO_ERROR; - } + params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; + [cluster launchAppWithParams:params + completionHandler:^( + CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch an app with the provided a application ID Error: %@", err); - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() + CHIP_ERROR TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher 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)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(7))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65533UL)); - } - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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); - } + __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"NonAvailableApp"; - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; + [cluster launchAppWithParams:params + completionHandler:^( + CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends a LaunchApp command to DUT to launch an app which is not available 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(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 1U)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - } + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher 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); + __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp2"; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; + [cluster launchAppWithParams:params + completionHandler:^( + CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Launch an app with the provided a application ID Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 2U)); + } - return CHIP_NO_ERROR; - } + { + id actualValue = values.data; + VerifyOrReturn( + CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } - CHIP_ERROR - TestReadFeatureMapAttributeFromTheDutValuesBasedOnFeaturePicsSupportBit0SetTo1IfTheDutSupportsContentSearchPicsContentsearchIsTrueBit1SetTo1IfTheDutSupportsUrlPlaybackPicsUrlplaybackIsTrue_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_MC_1_12 : public TestCommandBridge { +class Test_TC_MC_3_8 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_1_12() - : TestCommandBridge("Test_TC_MC_1_12") + Test_TC_MC_3_8() + : TestCommandBridge("Test_TC_MC_3_8") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31408,7 +30805,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_1_12() {} + ~Test_TC_MC_3_8() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31416,11 +30813,11 @@ class Test_TC_MC_1_12 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_1_12\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_8\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_1_12\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_8\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31437,47 +30834,20 @@ class Test_TC_MC_1_12 : public TestCommandBridge { 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: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : 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_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Stop an app with the provided application ID\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + err = TestStopAnAppWithTheProvidedApplicationId_1(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6(); + err = TestReadsTheStatusAttribute_2(); break; } @@ -31499,18 +30869,6 @@ class Test_TC_MC_1_12 : public TestCommandBridge { 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; } // Go on to the next test. @@ -31524,7 +30882,7 @@ class Test_TC_MC_1_12 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -31538,131 +30896,73 @@ class Test_TC_MC_1_12 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() + CHIP_ERROR TestStopAnAppWithTheProvidedApplicationId_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher 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); + __auto_type * params = [[CHIPApplicationLauncherClusterStopAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster + stopAppWithParams:params + completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Stop an app with the provided application ID Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin 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 global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("", actualValue[0], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65533UL)); - } - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 TestReadTheGlobalAttributeAcceptedCommandList_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 3UL)); - } + { + id actualValue = values.data; + VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); + } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadsTheStatusAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccountLogin * cluster = [[CHIPTestAccountLogin alloc] initWithDevice:device endpoint:3 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic 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 readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Status attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("", actualValue[0], 1UL)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_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_MC_2_1 : public TestCommandBridge { +class Test_TC_MC_3_9 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_2_1() - : TestCommandBridge("Test_TC_MC_2_1") + Test_TC_MC_3_9() + : TestCommandBridge("Test_TC_MC_3_9") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31672,7 +30972,7 @@ class Test_TC_MC_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_2_1() {} + ~Test_TC_MC_3_9() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31680,11 +30980,11 @@ class Test_TC_MC_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_9\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_9\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31701,8 +31001,20 @@ class Test_TC_MC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends Sleep command to DUT\n"); - err = TestThSendsSleepCommandToDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends HideApp command to DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestThSendsHideAppCommandToDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsTheStatusAttribute_2(); break; } @@ -31721,6 +31033,9 @@ class Test_TC_MC_2_1 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -31734,7 +31049,7 @@ class Test_TC_MC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -31748,17 +31063,51 @@ class Test_TC_MC_2_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsSleepCommandToDut_1() + CHIP_ERROR TestThSendsHideAppCommandToDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestLowPower * cluster = [[CHIPTestLowPower alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster sleepWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Sleep command to DUT Error: %@", err); + __auto_type * params = [[CHIPApplicationLauncherClusterHideAppParams alloc] init]; + params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; + ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = + [NSNumber numberWithUnsignedShort:1234U]; + ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; + + [cluster + hideAppWithParams:params + completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends HideApp command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheStatusAttribute_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Status attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + NextTest(); }]; @@ -31766,11 +31115,11 @@ class Test_TC_MC_2_1 : public TestCommandBridge { } }; -class Test_TC_MC_3_2 : public TestCommandBridge { +class Test_TC_MC_3_10 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_2() - : TestCommandBridge("Test_TC_MC_3_2") + Test_TC_MC_3_10() + : TestCommandBridge("Test_TC_MC_3_10") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31780,7 +31129,7 @@ class Test_TC_MC_3_2 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_2() {} + ~Test_TC_MC_3_10() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31788,11 +31137,11 @@ class Test_TC_MC_3_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31809,20 +31158,8 @@ class Test_TC_MC_3_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends CEC Settings Keys(0x0A) to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsCecSettingsKeys0x0AToDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends CEC Home Keys(0x09) to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsCecHomeKeys0x09ToDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); break; } @@ -31841,9 +31178,6 @@ class Test_TC_MC_3_2 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -31857,7 +31191,7 @@ class Test_TC_MC_3_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 2; chip::Optional mNodeId; chip::Optional mCluster; @@ -31871,52 +31205,30 @@ class Test_TC_MC_3_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsCecSettingsKeys0x0AToDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:10]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Settings Keys(0x0A) to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsCecHomeKeys0x09ToDut_2() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends CEC Home Keys(0x09) to DUT Error: %@", err); + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_MC_3_3 : public TestCommandBridge { +class Test_TC_MC_3_11 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_3() - : TestCommandBridge("Test_TC_MC_3_3") + Test_TC_MC_3_11() + : TestCommandBridge("Test_TC_MC_3_11") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -31926,7 +31238,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_3() {} + ~Test_TC_MC_3_11() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -31934,11 +31246,11 @@ class Test_TC_MC_3_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -31955,76 +31267,24 @@ class Test_TC_MC_3_3 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Numbers1\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendNumbers1_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Send Numbers2\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Select Input Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestSendNumbers2_2(); + err = TestSelectInputCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send Numbers3\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendNumbers3_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Send Numbers4\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendNumbers4_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send Numbers5\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendNumbers5_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Send Numbers6\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendNumbers6_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Send Numbers7\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendNumbers7_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Send Numbers8\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendNumbers8_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Send Numbers9\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read current input list\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestSendNumbers9_9(); + err = TestReadCurrentInputList_3(); break; } @@ -32049,24 +31309,6 @@ class Test_TC_MC_3_3 : 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; - 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. @@ -32080,7 +31322,7 @@ class Test_TC_MC_3_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -32094,192 +31336,72 @@ class Test_TC_MC_3_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestSendNumbers1_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:33]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers1 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendNumbers2_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:34]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers2 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendNumbers3_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:35]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers3 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendNumbers4_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:36]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers4 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendNumbers5_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:37]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers5 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendNumbers6_6() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:38]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers6 Error: %@", err); + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendNumbers7_7() + CHIP_ERROR TestSelectInputCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:39]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers7 Error: %@", err); + __auto_type * params = [[CHIPMediaInputClusterSelectInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + [cluster selectInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Select Input 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 TestSendNumbers8_8() + CHIP_ERROR TestReadCurrentInputList_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:40]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers8 Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendNumbers9_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read current input list Error: %@", err); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:41]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Send Numbers9 Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_MC_3_4 : public TestCommandBridge { +class Test_TC_MC_3_12 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_4() - : TestCommandBridge("Test_TC_MC_3_4") + Test_TC_MC_3_12() + : TestCommandBridge("Test_TC_MC_3_12") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -32289,7 +31411,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_4() {} + ~Test_TC_MC_3_12() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32297,11 +31419,11 @@ class Test_TC_MC_3_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_12\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_12\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32318,84 +31440,20 @@ class Test_TC_MC_3_4 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends same KeyPad input codes to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Hide Input Status Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsSameKeyPadInputCodesToDut_1(); + err = TestHideInputStatusCommand_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends same KeyPad input codes to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsSameKeyPadInputCodesToDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends same KeyPad input codes to DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThSendsSameKeyPadInputCodesToDut_10(); + err = TestShowInputStatusCommand_2(); break; } @@ -32417,30 +31475,6 @@ class Test_TC_MC_3_4 : public TestCommandBridge { 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. @@ -32454,7 +31488,7 @@ class Test_TC_MC_3_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -32468,212 +31502,46 @@ class Test_TC_MC_3_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsSameKeyPadInputCodesToDut_9() + CHIP_ERROR TestHideInputStatusCommand_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Hide Input Status 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 TestThSendsSameKeyPadInputCodesToDut_10() + CHIP_ERROR TestShowInputStatusCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestKeypadInput * cluster = [[CHIPTestKeypadInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:9]; - [cluster sendKeyWithParams:params - completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends same KeyPad input codes to DUT Error: %@", err); + [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Show Input Status 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; } }; -class Test_TC_MC_3_5 : public TestCommandBridge { +class Test_TC_MC_3_13 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_5() - : TestCommandBridge("Test_TC_MC_3_5") + Test_TC_MC_3_13() + : TestCommandBridge("Test_TC_MC_3_13") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -32683,7 +31551,7 @@ class Test_TC_MC_3_5 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_5() {} + ~Test_TC_MC_3_13() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32691,11 +31559,11 @@ class Test_TC_MC_3_5 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_13\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_13\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32712,8 +31580,28 @@ class Test_TC_MC_3_5 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read CatalogList attribute.\n"); - err = TestReadCatalogListAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRenameInputCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Rename Input Command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestRenameInputCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute media input list\n"); + err = TestReadAttributeMediaInputList_4(); break; } @@ -32732,6 +31620,15 @@ class Test_TC_MC_3_5 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + 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. @@ -32745,7 +31642,7 @@ class Test_TC_MC_3_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -32759,20 +31656,78 @@ class Test_TC_MC_3_5 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadCatalogListAttribute_1() + CHIP_ERROR TestReadAttributeMediaInputList_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCatalogListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read CatalogList attribute. Error: %@", err); + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("catalogList", "", "list")); + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRenameInputCommand_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"A1"; + [cluster renameInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestRenameInputCommand_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"A2"; + [cluster renameInputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadAttributeMediaInputList_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute media input list Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("inputList", "", "list")); NextTest(); }]; @@ -32780,11 +31735,11 @@ class Test_TC_MC_3_5 : public TestCommandBridge { } }; -class Test_TC_MC_3_6 : public TestCommandBridge { +class Test_TC_MC_5_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_6() - : TestCommandBridge("Test_TC_MC_3_6") + Test_TC_MC_5_1() + : TestCommandBridge("Test_TC_MC_5_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -32794,7 +31749,7 @@ class Test_TC_MC_3_6 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_6() {} + ~Test_TC_MC_5_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32802,11 +31757,11 @@ class Test_TC_MC_3_6 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32823,12 +31778,8 @@ class Test_TC_MC_3_6 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read Current App ID attribute.\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadCurrentAppIdAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); + err = TestReadsTheChannelListAttributeFromTheDut_1(); break; } @@ -32874,29 +31825,18 @@ class Test_TC_MC_3_6 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadCurrentAppIdAttribute_1() + CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentAppWithCompletionHandler:^( - CHIPApplicationLauncherClusterApplicationEP * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read Current App ID attribute. Error: %@", err); + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValueNull("CurrentApp", actualValue)); - } - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("currentApp", "", "ApplicationEP")); - } - + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); NextTest(); }]; @@ -32904,21 +31844,23 @@ class Test_TC_MC_3_6 : public TestCommandBridge { } }; -class Test_TC_MC_3_7 : public TestCommandBridge { +class Test_TC_MC_5_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_7() - : TestCommandBridge("Test_TC_MC_3_7") + Test_TC_MC_5_2() + : TestCommandBridge("Test_TC_MC_5_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_7() {} + ~Test_TC_MC_5_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -32926,11 +31868,11 @@ class Test_TC_MC_3_7 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -32947,29 +31889,28 @@ class Test_TC_MC_3_7 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Launch an app with the provided a application ID\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute\n"); + err = TestReadsTheChannelListAttribute_1(); break; case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : TH sends a LaunchApp command to DUT to launch an app which is not available\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a ChangeChannelByNumber command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2(); + err = TestThSendsAChangeChannelByNumberCommand_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Launch an app with the provided a application ID\n"); + ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); + err = TestLogACommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentChannel attribute\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestLaunchAnAppWithTheProvidedAApplicationId_3(); + err = TestReadsTheCurrentChannelAttribute_4(); break; } @@ -32994,6 +31935,9 @@ class Test_TC_MC_3_7 : 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. @@ -33007,11 +31951,13 @@ class Test_TC_MC_3_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -33021,139 +31967,96 @@ class Test_TC_MC_3_7 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() + CHIP_ERROR TestReadsTheChannelListAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1)); - } + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute Error: %@", err); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsALaunchAppCommandToDutToLaunchAnAppWhichIsNotAvailable_2() + CHIP_ERROR TestThSendsAChangeChannelByNumberCommand_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"NonAvailableApp"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends a LaunchApp command to DUT to launch an app which is not available Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 1)); - } + __auto_type * params = [[CHIPChannelClusterChangeChannelByNumberParams alloc] init]; + params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] + : [NSNumber numberWithUnsignedShort:1U]; + params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] + : [NSNumber numberWithUnsignedShort:2U]; + [cluster changeChannelByNumberWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_3() + CHIP_ERROR TestLogACommand_3() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentChannelAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp2"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster launchAppWithParams:params - completionHandler:^( - CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.data; - VerifyOrReturn( - CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_MC_3_8 : public TestCommandBridge { +class Test_TC_MC_5_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_8() - : TestCommandBridge("Test_TC_MC_3_8") + Test_TC_MC_5_3() + : TestCommandBridge("Test_TC_MC_5_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); + AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_8() {} + ~Test_TC_MC_5_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33161,11 +32064,11 @@ class Test_TC_MC_3_8 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33182,20 +32085,36 @@ class Test_TC_MC_3_8 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Stop an app with the provided application ID\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); + err = TestReadsTheChannelListAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentChannel attribute from the DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestStopAnAppWithTheProvidedApplicationId_1(); + err = TestReadsTheCurrentChannelAttributeFromTheDut_2(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a SkipChannel command to the DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheStatusAttribute_2(); + err = TestSendsASkipChannelCommandToTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); + err = TestLogACommand_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentChannel attribute from the DUT\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsTheCurrentChannelAttributeFromTheDut_5(); break; } @@ -33217,6 +32136,15 @@ class Test_TC_MC_3_8 : public TestCommandBridge { 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; } // Go on to the next test. @@ -33230,11 +32158,13 @@ class Test_TC_MC_3_8 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mMajornumber; + chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -33244,59 +32174,94 @@ class Test_TC_MC_3_8 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestStopAnAppWithTheProvidedApplicationId_1() + CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterStopAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; + [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); - [cluster - stopAppWithParams:params - completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Stop an app with the provided application ID Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + NextTest(); + }]; - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); - } + return CHIP_NO_ERROR; + } + CHIPChannelClusterChannelInfo * _Nullable currentChannelvalue; - { - id actualValue = values.data; - VerifyOrReturn(CheckValueAsString("data", actualValue, [[NSData alloc] initWithBytes:"Hello World" length:11])); - } + CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - NextTest(); - }]; + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); + } + { + currentChannelvalue = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_2() + CHIP_ERROR TestSendsASkipChannelCommandToTheDut_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + __auto_type * params = [[CHIPChannelClusterSkipChannelParams alloc] init]; + params.count = [NSNumber numberWithUnsignedShort:1U]; + [cluster skipChannelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestLogACommand_4() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message + = chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentChannelWithCompletionHandler:^( + CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); } NextTest(); @@ -33306,11 +32271,11 @@ class Test_TC_MC_3_8 : public TestCommandBridge { } }; -class Test_TC_MC_3_9 : public TestCommandBridge { +class Test_TC_MC_7_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_9() - : TestCommandBridge("Test_TC_MC_3_9") + Test_TC_MC_7_1() + : TestCommandBridge("Test_TC_MC_7_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -33320,7 +32285,7 @@ class Test_TC_MC_3_9 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_9() {} + ~Test_TC_MC_7_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33328,11 +32293,11 @@ class Test_TC_MC_3_9 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33349,20 +32314,24 @@ class Test_TC_MC_3_9 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH sends HideApp command to DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute\n"); + err = TestReadsTheOutputListAttribute_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a SelectAudioOutput command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsHideAppCommandToDut_1(); + err = TestSendsASelectAudioOutputCommand_2(); break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the Status attribute\n"); + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentOutput attribute\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheStatusAttribute_2(); + err = TestReadsTheCurrentOutputAttribute_3(); break; } @@ -33384,6 +32353,9 @@ class Test_TC_MC_3_9 : public TestCommandBridge { case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -33397,7 +32369,7 @@ class Test_TC_MC_3_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -33411,49 +32383,58 @@ class Test_TC_MC_3_9 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThSendsHideAppCommandToDut_1() + CHIP_ERROR TestReadsTheOutputListAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationLauncher * cluster = [[CHIPTestApplicationLauncher alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPApplicationLauncherClusterHideAppParams alloc] init]; - params.application = [[CHIPApplicationLauncherClusterApplication alloc] init]; - ((CHIPApplicationLauncherClusterApplication *) params.application).catalogVendorId = - [NSNumber numberWithUnsignedShort:1234U]; - ((CHIPApplicationLauncherClusterApplication *) params.application).applicationId = @"HelloWorldApp"; + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OutputList attribute Error: %@", err); - [cluster - hideAppWithParams:params - completionHandler:^(CHIPApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends HideApp command to DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestSendsASelectAudioOutputCommand_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPAudioOutputClusterSelectOutputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + [cluster selectOutputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a SelectAudioOutput command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_2() + CHIP_ERROR TestReadsTheCurrentOutputAttribute_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentOutput attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1U)); } NextTest(); @@ -33463,11 +32444,11 @@ class Test_TC_MC_3_9 : public TestCommandBridge { } }; -class Test_TC_MC_3_10 : public TestCommandBridge { +class Test_TC_MC_7_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_10() - : TestCommandBridge("Test_TC_MC_3_10") + Test_TC_MC_7_2() + : TestCommandBridge("Test_TC_MC_7_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -33477,7 +32458,7 @@ class Test_TC_MC_3_10 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_10() {} + ~Test_TC_MC_7_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33485,11 +32466,11 @@ class Test_TC_MC_3_10 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_10\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_10\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33506,8 +32487,26 @@ class Test_TC_MC_3_10 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute from the DUT\n"); + err = TestReadsTheOutputListAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a RenameOutput command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendsARenameOutputCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : Reads the OutputList attribute from the DUT Verify that the output at the index provided in " + "step 2 has the name CertTest\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3(); break; } @@ -33526,6 +32525,12 @@ class Test_TC_MC_3_10 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -33539,7 +32544,7 @@ class Test_TC_MC_3_10 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -33552,41 +32557,78 @@ class Test_TC_MC_3_10 : public TestCommandBridge { value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } + NSArray * _Nonnull audioOutputListValues; - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestReadsTheOutputListAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the OutputList attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); + { + audioOutputListValues = value; + } + NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestSendsARenameOutputCommand_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPAudioOutputClusterRenameOutputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"CertTest"; + [cluster renameOutputWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Sends a RenameOutput command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_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); + } }; -class Test_TC_MC_3_11 : public TestCommandBridge { +class Test_TC_MC_8_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_11() - : TestCommandBridge("Test_TC_MC_3_11") + Test_TC_MC_8_1() + : TestCommandBridge("Test_TC_MC_8_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); + AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_11() {} + ~Test_TC_MC_8_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33594,11 +32636,11 @@ class Test_TC_MC_3_11 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_11\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_8_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_11\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_8_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33615,24 +32657,48 @@ class Test_TC_MC_3_11 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); + err = TestReadsTheCurrentTargetAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Select Input Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); + err = TestReadsTheTargetListAttribute_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a NavigateTarget command\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestSelectInputCommand_2(); + err = TestSendsANavigateTargetCommand_3(); break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read current input list\n"); + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadCurrentInputList_3(); + err = TestReadsTheCurrentTargetAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the TargetList attribute\n"); + err = TestReadsTheTargetListAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a NavigateTarget command\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestSendsANavigateTargetCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentTarget attribute\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadsTheCurrentTargetAttribute_7(); break; } @@ -33657,6 +32723,18 @@ class Test_TC_MC_3_11 : 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. @@ -33670,11 +32748,13 @@ class Test_TC_MC_3_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTargetvalue1; + chip::Optional mTargetvalue2; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -33684,200 +32764,157 @@ class Test_TC_MC_3_11 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); NextTest(); }]; return CHIP_NO_ERROR; } + NSArray * _Nonnull TargetListValues; - CHIP_ERROR TestSelectInputCommand_2() + CHIP_ERROR TestReadsTheTargetListAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterSelectInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; - [cluster selectInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Select Input Command Error: %@", err); + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the TargetList attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + { + TargetListValues = value; + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadCurrentInputList_3() + CHIP_ERROR TestSendsANavigateTargetCommand_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentInputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current input list Error: %@", err); + __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = mTargetvalue1.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue1.Value()] + : [NSNumber numberWithUnsignedChar:1U]; + [cluster navigateTargetWithParams:params + completionHandler:^( + CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1)); - } + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_MC_3_12 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_12() - : TestCommandBridge("Test_TC_MC_3_12") - , 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_MC_3_12() {} - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_12\n"); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_12\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); - Wait(); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Hide Input Status Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestHideInputStatusCommand_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Show Input Status Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1U)); } - err = TestShowInputStatusCommand_2(); - 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; - } + NextTest(); + }]; - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestReadsTheTargetListAttribute_5() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the TargetList attribute 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); + VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestHideInputStatusCommand_1() + CHIP_ERROR TestSendsANavigateTargetCommand_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster hideInputStatusWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Hide Input Status Command Error: %@", err); + __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.target = mTargetvalue2.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue2.Value()] + : [NSNumber numberWithUnsignedChar:2U]; + [cluster navigateTargetWithParams:params + completionHandler:^( + CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"Sends a NavigateTarget command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("status", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestShowInputStatusCommand_2() + CHIP_ERROR TestReadsTheCurrentTargetAttribute_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster showInputStatusWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Show Input Status Command Error: %@", err); + [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the CurrentTarget attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2U)); + } + NextTest(); }]; @@ -33885,11 +32922,11 @@ class Test_TC_MC_3_12 : public TestCommandBridge { } }; -class Test_TC_MC_3_13 : public TestCommandBridge { +class Test_TC_MC_9_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_3_13() - : TestCommandBridge("Test_TC_MC_3_13") + Test_TC_MC_9_1() + : TestCommandBridge("Test_TC_MC_9_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -33899,7 +32936,7 @@ class Test_TC_MC_3_13 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_3_13() {} + ~Test_TC_MC_9_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -33907,11 +32944,11 @@ class Test_TC_MC_3_13 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_13\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_13\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -33928,28 +32965,40 @@ class Test_TC_MC_3_13 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition\n"); + err = TestPrecondition_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRenameInputCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorName attribute\n"); + err = TestReadsTheVendorNameAttribute_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Rename Input Command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestRenameInputCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the VendorID attribute\n"); + err = TestReadsTheVendorIDAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read attribute media input list\n"); - err = TestReadAttributeMediaInputList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ApplicationName attribute\n"); + err = TestReadsTheApplicationNameAttribute_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the ProductID attribute\n"); + err = TestReadsTheProductIDAttribute_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Application attribute\n"); + err = TestReadsTheApplicationAttribute_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the Status attribute\n"); + err = TestReadsTheStatusAttribute_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the ApplicationVersion attribute\n"); + err = TestReadsTheApplicationVersionAttribute_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the AllowedVendorList attribute\n"); + err = TestReadsTheAllowedVendorListAttribute_9(); break; } @@ -33977,6 +33026,21 @@ class Test_TC_MC_3_13 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -33990,7 +33054,7 @@ class Test_TC_MC_3_13 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -34004,78 +33068,173 @@ class Test_TC_MC_3_13 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadAttributeMediaInputList_1() + CHIP_ERROR TestPrecondition_1() + { + chip::app::Clusters::LogCommands::Commands::Log::Type value; + value.message = chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); + return Log("alpha", value); + } + + CHIP_ERROR TestReadsTheVendorNameAttribute_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the VendorName attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRenameInputCommand_2() + CHIP_ERROR TestReadsTheVendorIDAttribute_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; - params.name = @"A1"; - [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the VendorID attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("vendorID", "", "vendor-id")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestRenameInputCommand_3() + CHIP_ERROR TestReadsTheApplicationNameAttribute_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; - params.name = @"A2"; - [cluster renameInputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ApplicationName attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("applicationName", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationName", [value length], 256)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadAttributeMediaInputList_4() + CHIP_ERROR TestReadsTheProductIDAttribute_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestMediaInput * cluster = [[CHIPTestMediaInput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeInputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute media input list Error: %@", err); + [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ProductID attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("inputList", "", "list")); + VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheApplicationAttribute_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeApplicationWithCompletionHandler:^( + CHIPApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Application attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("application", "", "struct")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheStatusAttribute_7() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the Status attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheApplicationVersionAttribute_8() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", [value length], 32)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadsTheAllowedVendorListAttribute_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device + endpoint:3 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("allowedVendorList", "", "list")); NextTest(); }]; @@ -34083,11 +33242,11 @@ class Test_TC_MC_3_13 : public TestCommandBridge { } }; -class Test_TC_MC_5_1 : public TestCommandBridge { +class Test_TC_MC_10_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_1() - : TestCommandBridge("Test_TC_MC_5_1") + Test_TC_MC_10_1() + : TestCommandBridge("Test_TC_MC_10_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -34097,7 +33256,7 @@ class Test_TC_MC_5_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_1() {} + ~Test_TC_MC_10_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34105,11 +33264,11 @@ class Test_TC_MC_5_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -34126,8 +33285,12 @@ class Test_TC_MC_5_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); - err = TestReadsTheChannelListAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the AcceptHeader attribute from the DUT\n"); + err = TestThReadsTheAcceptHeaderAttributeFromTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the SupportedStreamingProtocols attribute from the DUT\n"); + err = TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2(); break; } @@ -34146,6 +33309,9 @@ class Test_TC_MC_5_1 : public TestCommandBridge { case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -34159,7 +33325,7 @@ class Test_TC_MC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 2; + const uint16_t mTestCount = 3; chip::Optional mNodeId; chip::Optional mCluster; @@ -34173,42 +33339,59 @@ class Test_TC_MC_5_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() + CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); + [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the AcceptHeader attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + VerifyOrReturn(CheckConstraintType("acceptHeader", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; -class Test_TC_MC_5_2 : public TestCommandBridge { +class Test_TC_MOD_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_2() - : TestCommandBridge("Test_TC_MC_5_2") + Test_TC_MOD_1_1() + : TestCommandBridge("Test_TC_MOD_1_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_2() {} + ~Test_TC_MOD_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34216,11 +33399,11 @@ class Test_TC_MC_5_2 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -34237,28 +33420,38 @@ class Test_TC_MC_5_2 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute\n"); - err = TestReadsTheChannelListAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); + err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a ChangeChannelByNumber command\n"); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); + err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsAChangeChannelByNumberCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : log a command\n"); - err = TestLogACommand_3(); + err = TestThReadsTheAttributeListAttributeFromTheDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentChannel attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + ChipLogProgress(chipTool, + " ***** Test Step 4 : 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 = TestReadsTheCurrentChannelAttribute_4(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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; } @@ -34286,6 +33479,12 @@ class Test_TC_MC_5_2 : 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; } // Go on to the next test. @@ -34299,13 +33498,11 @@ class Test_TC_MC_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -34315,72 +33512,123 @@ class Test_TC_MC_5_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheChannelListAttribute_1() + CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAChangeChannelByNumberCommand_2() + CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPChannelClusterChangeChannelByNumberParams alloc] init]; - params.majorNumber = mMajornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMajornumber.Value()] - : [NSNumber numberWithUnsignedShort:1U]; - params.minorNumber = mMinornumber.HasValue() ? [NSNumber numberWithUnsignedShort:mMinornumber.Value()] - : [NSNumber numberWithUnsignedShort:2U]; - [cluster changeChannelByNumberWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends a ChangeChannelByNumber command Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map8")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLogACommand_3() + CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect 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 the AttributeList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("verify that the channel has changed on the device.garbage: not in length on purpose", 50); + value.message = chip::Span("Please enter 'y' for successgarbage: not 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 TestReadsTheCurrentChannelAttribute_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute 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(CheckValueNonNull("CurrentChannel", actualValue)); - } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestModeSelect * cluster = [[CHIPTestModeSelect 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")); NextTest(); }]; @@ -34388,23 +33636,23 @@ class Test_TC_MC_5_2 : public TestCommandBridge { } }; -class Test_TC_MC_5_3 : public TestCommandBridge { +class Test_TC_MF_1_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_5_3() - : TestCommandBridge("Test_TC_MC_5_3") + Test_TC_MF_1_3() + : TestCommandBridge("Test_TC_MF_1_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("majornumber", 0, UINT16_MAX, &mMajornumber); - AddArgument("minornumber", 0, UINT16_MAX, &mMinornumber); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_5_3() {} + ~Test_TC_MF_1_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34412,11 +33660,11 @@ class Test_TC_MC_5_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_5_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_5_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -34429,40 +33677,67 @@ class Test_TC_MC_5_3 : 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 : Stop target device\n"); + err = TestStopTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the ChannelList attribute from the DUT\n"); - err = TestReadsTheChannelListAttributeFromTheDut_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); + err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentChannelAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a SkipChannel command to the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsASkipChannelCommandToTheDut_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : log a command\n"); - err = TestLogACommand_4(); + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the CurrentChannel attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentChannelAttributeFromTheDut_5(); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); + err = TestCommissionFromBeta_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); + err = TestQueryFabricsList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); + err = TestQueryFabricsList_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); break; } @@ -34493,6 +33768,30 @@ class Test_TC_MC_5_3 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -34506,112 +33805,277 @@ class Test_TC_MC_5_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 14; chip::Optional mNodeId; - chip::Optional mCluster; + chip::Optional mNodeId2; chip::Optional mEndpoint; - chip::Optional mMajornumber; - chip::Optional mMinornumber; + chip::Optional mDiscriminator; + chip::Optional mPayload; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStopTargetDevice_0() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); + } + + CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start("alpha", value); + } + + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheChannelListAttributeFromTheDut_1() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeChannelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ChannelList attribute from the DUT Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\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\216L" + length:97]; + params.discriminator = mDiscriminator.HasValue() ? [NSNumber numberWithUnsignedShort:mDiscriminator.Value()] + : [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("channelList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIPChannelClusterChannelInfo * _Nullable currentChannelvalue; - CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_2() + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValueNonNull("CurrentChannel", actualValue)); - } - { - currentChannelvalue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); } + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASkipChannelCommandToTheDut_3() + CHIP_ERROR TestCommissionFromBeta_6() + { + 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("beta", value); + } + + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee("beta", value); + } + + CHIP_ERROR TestQueryFabricsList_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPChannelClusterSkipChannelParams alloc] init]; - params.count = [NSNumber numberWithUnsignedShort:1U]; - [cluster skipChannelWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a SkipChannel command to the DUT Error: %@", err); + CHIPReadParams * params = [[CHIPReadParams 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + } + + VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestLogACommand_4() + CHIP_ERROR TestQueryFabricsList_9() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message - = chip::Span("verify that the channel has changed on the devicegarbage: not in length on purpose", 49); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("beta"); + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:false]; + [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(2))); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); + } + + VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentChannelAttributeFromTheDut_5() + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestChannel * cluster = [[CHIPTestChannel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentChannelWithCompletionHandler:^( - CHIPChannelClusterChannelInfo * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentChannel attribute from the DUT Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest1"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (value != nil) { + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest1")); + } - VerifyOrReturn(CheckConstraintType("currentChannel", "", "list")); + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() + { + CHIPDevice * device = GetDevice("beta"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id nodeLabelArgument; + nodeLabelArgument = @"chiptest2"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() + { + CHIPDevice * device = GetDevice("beta"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest2")); } + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; @@ -34619,21 +34083,23 @@ class Test_TC_MC_5_3 : public TestCommandBridge { } }; -class Test_TC_MC_7_1 : public TestCommandBridge { +class Test_TC_MF_1_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_7_1() - : TestCommandBridge("Test_TC_MC_7_1") + Test_TC_MF_1_4() + : TestCommandBridge("Test_TC_MF_1_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); 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) - ~Test_TC_MC_7_1() {} + ~Test_TC_MF_1_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34641,11 +34107,11 @@ class Test_TC_MC_7_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -34658,28 +34124,67 @@ class Test_TC_MC_7_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); + err = TestStopTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the OutputList attribute\n"); - err = TestReadsTheOutputListAttribute_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); + err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a SelectAudioOutput command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsASelectAudioOutputCommand_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentOutput attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentOutputAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_3(); + break; + case 4: + ChipLogProgress(chipTool, + " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); + break; + case 5: + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); + err = TestCommissionFromBeta_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); + err = TestQueryFabricsList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); + err = TestQueryFabricsList_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); + break; + case 13: + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); + err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); break; } @@ -34704,6 +34209,36 @@ class Test_TC_MC_7_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; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -34717,266 +34252,276 @@ class Test_TC_MC_7_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + const uint16_t mTestCount = 14; chip::Optional mNodeId; - chip::Optional mCluster; + chip::Optional mNodeId2; chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; chip::Optional mTimeout; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStopTargetDevice_0() + { + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); + } + + CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() + { + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start("alpha", value); + } + + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheOutputListAttribute_1() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OutputList attribute Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsASelectAudioOutputCommand_2() + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAudioOutputClusterSelectOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; - [cluster selectOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a SelectAudioOutput command Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"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 TestReadsTheCurrentOutputAttribute_3() + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentOutputWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentOutput attribute Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1)); - } - + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } -}; -class Test_TC_MC_7_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_7_2() - : TestCommandBridge("Test_TC_MC_7_2") - , mTestIndex(0) + CHIP_ERROR TestCommissionFromBeta_6() { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + 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("beta", value); } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_7_2() {} + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee("beta", value); + } - /////////// TestCommand Interface ///////// - void NextTest() override + CHIP_ERROR TestQueryFabricsList_8() { - CHIP_ERROR err = CHIP_NO_ERROR; + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_7_2\n"); - } + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeFabricsWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Query fabrics list Error: %@", err); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_7_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + } - // 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 the OutputList attribute from the DUT\n"); - err = TestReadsTheOutputListAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Sends a RenameOutput command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsARenameOutputCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : Reads the OutputList attribute from the DUT Verify that the output at the index provided in " - "step 2 has the name CertTest\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3(); - break; - } + VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + 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 TestQueryFabricsList_9() { - 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; - } + CHIPDevice * device = GetDevice("beta"); + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); + CHIPReadParams * params = [[CHIPReadParams 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", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + } + + VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 4; + id nodeLabelArgument; + nodeLabelArgument = @"chiptest"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"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); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - NSArray * _Nonnull audioOutputListValues; - CHIP_ERROR TestReadsTheOutputListAttributeFromTheDut_1() + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOutputListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the OutputList attribute from the DUT Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("outputList", "", "OutPutInfo")); - { - audioOutputListValues = value; - } - + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsARenameOutputCommand_2() + CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAudioOutput * cluster = [[CHIPTestAudioOutput alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPDevice * device = GetDevice("beta"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAudioOutputClusterRenameOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; - params.name = @"CertTest"; - [cluster renameOutputWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Sends a RenameOutput command Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " + @"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 TestReadsTheOutputListAttributeFromTheDutVerifyThatTheOutputAtTheIndexProvidedInStep2HasTheNameCertTest_3() + CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_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); + CHIPDevice * device = GetDevice("beta"); + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); + VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_MC_8_1 : public TestCommandBridge { +class Test_TC_MF_1_5 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_8_1() - : TestCommandBridge("Test_TC_MC_8_1") + Test_TC_MF_1_5() + : TestCommandBridge("Test_TC_MF_1_5") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("targetvalue1", 0, UINT8_MAX, &mTargetvalue1); - AddArgument("targetvalue2", 0, UINT8_MAX, &mTargetvalue2); 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); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_8_1() {} + ~Test_TC_MF_1_5() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -34984,11 +34529,11 @@ class Test_TC_MC_8_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_8_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_8_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -35001,52 +34546,64 @@ class Test_TC_MC_8_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); + err = TestRebootTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentTarget attribute\n"); - err = TestReadsTheCurrentTargetAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the TargetList attribute\n"); - err = TestReadsTheTargetListAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Sends a NavigateTarget command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsANavigateTargetCommand_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); + err = TestWaitForPixitCommWin18010Seconds_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the CurrentTarget attribute\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadsTheCurrentTargetAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the TargetList attribute\n"); - err = TestReadsTheTargetListAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Sends a NavigateTarget command\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestSendsANavigateTargetCommand_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentTarget attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessWithDutCe_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE\n"); if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestReadsTheCurrentTargetAttribute_7(); + err = TestThCr2StartsACommissioningProcessWithDutCe_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_13(); break; } @@ -35072,7 +34629,7 @@ class Test_TC_MC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -35081,186 +34638,216 @@ class Test_TC_MC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); 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), EMBER_ZCL_STATUS_FAILURE)); + 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), EMBER_ZCL_STATUS_FAILURE)); + 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)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 14; chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTargetvalue1; - chip::Optional mTargetvalue2; chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + chip::Optional mNodeIdForDuplicateCommissioning; + chip::Optional mNodeId2; + chip::Optional mNodeId3; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + + CHIP_ERROR TestRebootTargetDevice_0() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestReadsTheCurrentTargetAttribute_1() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\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\216L" + length:97]; + params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentTarget", "", "uint8")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSArray * _Nonnull TargetListValues; - CHIP_ERROR TestReadsTheTargetListAttribute_2() + CHIP_ERROR TestWaitForPixitCommWin18010Seconds_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the TargetList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); - { - TargetListValues = value; - } - - NextTest(); - }]; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190000UL; + return WaitForMs("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_4() + { + 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("beta", value); } - CHIP_ERROR TestSendsANavigateTargetCommand_3() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue1.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue1.Value()] - : [NSNumber numberWithUnsignedChar:1]; - [cluster navigateTargetWithParams:params - completionHandler:^( - CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\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\216L" + length:97]; + params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentTargetAttribute_4() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue1.HasValue() ? mTargetvalue1.Value() : 1)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheTargetListAttribute_5() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + { + 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("beta", value); + } + + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeTargetListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the TargetList attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckConstraintType("targetList", "", "list")); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendsANavigateTargetCommand_6() + CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = mTargetvalue2.HasValue() ? [NSNumber numberWithUnsignedChar:mTargetvalue2.Value()] - : [NSNumber numberWithUnsignedChar:2]; - [cluster navigateTargetWithParams:params - completionHandler:^( - CHIPTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Sends a NavigateTarget command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE Error: %@", err); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheCurrentTargetAttribute_7() + CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestTargetNavigator * cluster = [[CHIPTestTargetNavigator alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentTargetWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentTarget attribute Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 read the mandatory attribute NodeLabel of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, mTargetvalue2.HasValue() ? mTargetvalue2.Value() : 2)); + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); } NextTest(); @@ -35268,23 +34855,74 @@ class Test_TC_MC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_11() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\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\216L" + length:97]; + params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_12() + { + 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("beta", value); + } + + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_13() + { + 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("gamma", value); + } }; -class Test_TC_MC_9_1 : public TestCommandBridge { +class Test_TC_MF_1_6 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_9_1() - : TestCommandBridge("Test_TC_MC_9_1") + Test_TC_MF_1_6() + : TestCommandBridge("Test_TC_MF_1_6") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); 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); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MC_9_1() {} + ~Test_TC_MF_1_6() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -35292,11 +34930,11 @@ class Test_TC_MC_9_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_6\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_9_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_6\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -35309,44 +34947,69 @@ class Test_TC_MC_9_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); + err = TestStopTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Precondition\n"); - err = TestPrecondition_1(); + ChipLogProgress(chipTool, + " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); + err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the VendorName attribute\n"); - err = TestReadsTheVendorNameAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the VendorID attribute\n"); - err = TestReadsTheVendorIDAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the ApplicationName attribute\n"); - err = TestReadsTheApplicationNameAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait for PIXIT_COMM_WIN(180) + 10\n"); + err = TestWaitForPixitCommWin18010_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the ProductID attribute\n"); - err = TestReadsTheProductIDAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Commission from beta\n"); + err = TestCommissionFromBeta_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the Application attribute\n"); - err = TestReadsTheApplicationAttribute_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the Status attribute\n"); - err = TestReadsTheStatusAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the ApplicationVersion attribute\n"); - err = TestReadsTheApplicationVersionAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Commission from beta\n"); + err = TestCommissionFromBeta_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the AllowedVendorList attribute\n"); - err = TestReadsTheAllowedVendorListAttribute_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 revokes the commissioning window on DUT_CE\n"); + err = TestThCr1RevokesTheCommissioningWindowOnDutCe_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); + err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Commission from beta\n"); + err = TestCommissionFromBeta_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process on DUT_CE\n"); + err = TestThCr2StartsACommissioningProcessOnDutCe_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_15(); break; } @@ -35375,7 +35038,7 @@ class Test_TC_MC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -35384,163 +35047,210 @@ class Test_TC_MC_9_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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), EMBER_ZCL_STATUS_FAILURE)); + 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)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 16; chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mNodeIdForDuplicateCommissioning; + chip::Optional mNodeId2; + chip::Optional mNodeId3; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestStopTargetDevice_0() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); } - CHIP_ERROR TestPrecondition_1() + CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() { - chip::app::Clusters::LogCommands::Commands::Log::Type value; - value.message = chip::Span("DUT has one or more Content Apps availablegarbage: not in length on purpose", 42); - return Log("alpha", value); + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.discriminator.Emplace(); + value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + return Start("alpha", value); } - CHIP_ERROR TestReadsTheVendorNameAttribute_2() + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the VendorName attribute Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("vendorName", [value length], 32)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheVendorIDAttribute_3() + CHIP_ERROR TestWaitForPixitCommWin18010_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestCommissionFromBeta_5() + { + 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("beta", value); + } + + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeVendorIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the VendorID attribute Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("vendorID", "", "vendor-id")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationNameAttribute_4() + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationNameWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ApplicationName attribute Error: %@", err); + [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("applicationName", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationName", [value length], 256)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheProductIDAttribute_5() + CHIP_ERROR TestCommissionFromBeta_8() + { + 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("beta", value); + } + + CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_9() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeProductIDWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ProductID attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckConstraintType("productID", "", "uint16")); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationAttribute_6() + CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeApplicationWithCompletionHandler:^( - CHIPApplicationBasicClusterApplicationBasicApplication * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Application attribute Error: %@", err); + id nodeLabelArgument; + nodeLabelArgument = @"chiptest"; + [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("application", "", "struct")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheStatusAttribute_7() + CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeStatusWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the Status attribute Error: %@", err); + [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 read the mandatory attribute NodeLabel of DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3)); + { + id actualValue = value; + VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); + } NextTest(); }]; @@ -35548,198 +35258,72 @@ class Test_TC_MC_9_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsTheApplicationVersionAttribute_8() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_12() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeApplicationVersionWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the ApplicationVersion attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("applicationVersion", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("applicationVersion", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsTheAllowedVendorListAttribute_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestApplicationBasic * cluster = [[CHIPTestApplicationBasic alloc] initWithDevice:device - endpoint:3 - queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAllowedVendorListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the AllowedVendorList attribute Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("allowedVendorList", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } -}; - -class Test_TC_MC_10_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MC_10_1() - : TestCommandBridge("Test_TC_MC_10_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_MC_10_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_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 : TH reads the AcceptHeader attribute from the DUT\n"); - err = TestThReadsTheAcceptHeaderAttributeFromTheDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the SupportedStreamingProtocols attribute from the DUT\n"); - err = TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2(); - 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; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - chip::System::Clock::Timeout GetWaitDuration() const override + CHIP_ERROR TestCommissionFromBeta_13() { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + 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("beta", value); } -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_ERROR TestThCr2StartsACommissioningProcessOnDutCe_14() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheAcceptHeaderAttributeFromTheDut_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptHeaderWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AcceptHeader attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptHeader", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee("beta", value); } - CHIP_ERROR TestThReadsTheSupportedStreamingProtocolsAttributeFromTheDut_2() + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_15() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestContentLauncher * cluster = [[CHIPTestContentLauncher alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeSupportedStreamingProtocolsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the SupportedStreamingProtocols attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("supportedStreamingProtocols", "", "map32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + 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("gamma", value); } }; -class Test_TC_MOD_1_1 : public TestCommandBridge { +class Test_TC_MF_1_9 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MOD_1_1() - : TestCommandBridge("Test_TC_MOD_1_1") + Test_TC_MF_1_9() + : TestCommandBridge("Test_TC_MF_1_9") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); 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); + AddArgument("payload2", &mPayload2); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MOD_1_1() {} + ~Test_TC_MF_1_9() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -35747,11 +35331,11 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_9\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_9\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -35764,42 +35348,125 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); + err = TestRebootTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision attribute from the DUT\n"); - err = TestThReadsTheClusterRevisionAttributeFromTheDut_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads the AttributeList attribute from the DUT\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThReadsTheAttributeListAttributeFromTheDut_3(); + ChipLogProgress( + chipTool, " ***** Test Step 3 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : 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_4(); + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_5(); + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_6(); + ChipLogProgress( + chipTool, " ***** Test Step 6 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_6(); + break; + case 7: + ChipLogProgress( + chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7(); + break; + case 8: + ChipLogProgress( + chipTool, " ***** Test Step 8 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8(); + break; + case 9: + ChipLogProgress( + chipTool, " ***** Test Step 9 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9(); + break; + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11(); + break; + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12(); + break; + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13(); + break; + case 14: + ChipLogProgress( + chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17(); + break; + case 18: + ChipLogProgress( + chipTool, " ***** Test Step 18 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18(); + break; + case 19: + ChipLogProgress( + chipTool, " ***** Test Step 19 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19(); + break; + case 20: + ChipLogProgress( + chipTool, " ***** Test Step 20 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20(); + break; + case 21: + ChipLogProgress( + chipTool, " ***** Test Step 21 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21(); + break; + case 22: + ChipLogProgress( + chipTool, " ***** Test Step 22 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22(); + break; + case 23: + ChipLogProgress( + chipTool, " ***** Test Step 23 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_24(); break; } @@ -35822,16 +35489,70 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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), EMBER_ZCL_STATUS_FAILURE)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 21: + 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), EMBER_ZCL_STATUS_FAILURE)); break; } @@ -35839,168 +35560,264 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { ContinueOnChipMainThread(CHIP_NO_ERROR); } - 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(700)); } private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 25; chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; chip::Optional mTimeout; + chip::Optional mNodeIdForDuplicateCommissioning; + chip::Optional mNodeId2; + chip::Optional mNodeId3; + chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mPayload2; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + CHIP_ERROR TestRebootTargetDevice_0() + { + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); + } + + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheClusterRevisionAttributeFromTheDut_1() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_2() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\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\216L" + length:97]; + params.discriminator = mDiscriminator.HasValue() ? [NSNumber numberWithUnsignedShort:mDiscriminator.Value()] + : [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_6() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckConstraintType("featureMap", "", "map8")); - NextTest(); - }]; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the AttributeList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(9))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); - VerifyOrReturn(CheckValue("", actualValue[6], 65531UL)); - VerifyOrReturn(CheckValue("", actualValue[7], 65532UL)); - VerifyOrReturn(CheckValue("", actualValue[8], 65533UL)); - } + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestModeSelect * cluster = [[CHIPTestModeSelect alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - [cluster readAttributeGeneratedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_24() + { + 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("gamma", value); } }; -class Test_TC_MF_1_3 : public TestCommandBridge { +class Test_TC_MF_1_10 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_3() - : TestCommandBridge("Test_TC_MF_1_3") + Test_TC_MF_1_10() + : TestCommandBridge("Test_TC_MF_1_10") , mTestIndex(0) { 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); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + AddArgument("payload2", &mPayload2); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MF_1_3() {} + ~Test_TC_MF_1_10() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -36008,11 +35825,11 @@ class Test_TC_MF_1_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_10\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_10\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -36025,67 +35842,125 @@ class Test_TC_MF_1_3 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); - err = TestStopTargetDevice_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); + err = TestRebootTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); - err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_3(); + ChipLogProgress( + chipTool, " ***** Test Step 3 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); + ChipLogProgress( + chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); - err = TestCommissionFromBeta_6(); + ChipLogProgress( + chipTool, " ***** Test Step 6 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_7(); + ChipLogProgress( + chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); - err = TestQueryFabricsList_8(); + ChipLogProgress( + chipTool, " ***** Test Step 8 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); - err = TestQueryFabricsList_9(); + ChipLogProgress( + chipTool, " ***** Test Step 9 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); + ChipLogProgress( + chipTool, " ***** Test Step 10 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); + ChipLogProgress( + chipTool, " ***** Test Step 11 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); + ChipLogProgress( + chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); + ChipLogProgress( + chipTool, " ***** Test Step 13 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13(); + break; + case 14: + ChipLogProgress( + chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14(); + break; + case 15: + ChipLogProgress( + chipTool, " ***** Test Step 15 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17(); + break; + case 18: + ChipLogProgress( + chipTool, " ***** Test Step 18 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18(); + break; + case 19: + ChipLogProgress( + chipTool, " ***** Test Step 19 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19(); + break; + case 20: + ChipLogProgress( + chipTool, " ***** Test Step 20 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20(); + break; + case 21: + ChipLogProgress( + chipTool, " ***** Test Step 21 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21(); + break; + case 22: + ChipLogProgress( + chipTool, " ***** Test Step 22 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22(); + break; + case 23: + ChipLogProgress( + chipTool, " ***** Test Step 23 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); + err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_24(); break; } @@ -36108,37 +35983,70 @@ class Test_TC_MF_1_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); 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)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); 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)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + break; + case 21: + 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), EMBER_ZCL_STATUS_FAILURE)); break; } @@ -36146,44 +36054,36 @@ class Test_TC_MF_1_3 : public TestCommandBridge { ContinueOnChipMainThread(CHIP_NO_ERROR); } - 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(700)); } private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 25; 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::Optional mTimeout; - - CHIP_ERROR TestStopTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } + chip::Optional mPayload2; - CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() + CHIP_ERROR TestRebootTargetDevice_0() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start("alpha", value); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36191,263 +36091,216 @@ class Test_TC_MF_1_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\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\216L" - length:97]; - params.discriminator = mDiscriminator.HasValue() ? [NSNumber numberWithUnsignedShort:mDiscriminator.Value()] - : [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE 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 TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - NextTest(); - }]; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_6() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); - } + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestCommissionFromBeta_6() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13() { 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 = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); return PairWithCode("beta", value); } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee("beta", value); + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestQueryFabricsList_8() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - CHIPReadParams * params = [[CHIPReadParams 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", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - } - - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestQueryFabricsList_9() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16() { - CHIPDevice * device = GetDevice("beta"); - CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:false]; - [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(2))); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); - } - - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest1"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest1")); - } - - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestThCr2WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19() { - CHIPDevice * device = GetDevice("beta"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest2"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); } - CHIP_ERROR TestThCr2ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20() { - CHIPDevice * device = GetDevice("beta"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest2")); - } + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; + CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23() + { + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); + return PairWithCode("beta", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_24() + { + 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("gamma", value); } }; -class Test_TC_MF_1_4 : public TestCommandBridge { +class Test_TC_MF_1_15 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_4() - : TestCommandBridge("Test_TC_MF_1_4") + Test_TC_MF_1_15() + : TestCommandBridge("Test_TC_MF_1_15") , mTestIndex(0) { 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); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MF_1_4() {} + ~Test_TC_MF_1_15() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -36455,11 +36308,11 @@ class Test_TC_MF_1_4 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_15\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_15\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -36472,31 +36325,28 @@ class Test_TC_MF_1_4 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); - err = TestStopTargetDevice_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); + err = TestRebootTargetDevice_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); - err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); + err = TestThCr1StartsACommissioningProcessWithDutCe_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Commission from gamma\n"); + err = TestCommissionFromGamma_3(); break; case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR3 starts a commissioning process with DUT_CE\n"); + err = TestThCr3StartsACommissioningProcessWithDutCe_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); @@ -36507,32 +36357,44 @@ class Test_TC_MF_1_4 : public TestCommandBridge { err = TestThCr2StartsACommissioningProcessWithDutCe_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Query fabrics list\n"); - err = TestQueryFabricsList_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : TH_CR1 opens a commissioning window on DUT_CE\n"); + err = TestThCr1OpensACommissioningWindowOnDutCe_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Query fabrics list\n"); - err = TestQueryFabricsList_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_9(); break; case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 reads the list of Fabrics on DUT_CE\n"); + err = TestThCr1ReadsTheListOfFabricsOnDutCe_10(); break; case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); + err = TestWaitForTheExpirationOfPixitCommWinSeconds_11(); break; case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 re-opens new commissioning window on DUT_CE\n"); + err = TestThCr1ReOpensNewCommissioningWindowOnDutCe_12(); break; case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE\n"); - err = TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 opens a new commissioning window on DUT_CE\n"); + err = TestThCr3OpensANewCommissioningWindowOnDutCe_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR1 reads the list of Fabrics on DUT_CE\n"); + err = TestThCr1ReadsTheListOfFabricsOnDutCe_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); + err = TestWaitForTheExpirationOfPixitCommWinSeconds_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR1 opens a new commissioning window on DUT_CE\n"); + err = TestThCr1OpensANewCommissioningWindowOnDutCe_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH_CR2 opens a new commissioning window on DUT_CE\n"); + err = TestThCr2OpensANewCommissioningWindowOnDutCe_17(); break; } @@ -36573,7 +36435,7 @@ class Test_TC_MF_1_4 : 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_FAILURE)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -36585,52 +36447,55 @@ class Test_TC_MF_1_4 : 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_FAILURE)); + 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), EMBER_ZCL_STATUS_FAILURE)); + 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)); - } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(500)); } private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 18; 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::Optional mTimeout; - - CHIP_ERROR TestStopTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } - CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() + CHIP_ERROR TestRebootTargetDevice_0() { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - return Start("alpha", value); + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot("alpha", value); } - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() + CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -36652,43 +36517,39 @@ class Test_TC_MF_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_4() + CHIP_ERROR TestCommissionFromGamma_3() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + 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("gamma", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee("gamma", value); } - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_5() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_5() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -36708,57 +36569,83 @@ class Test_TC_MF_1_4 : public TestCommandBridge { return WaitForCommissionee("beta", value); } - CHIP_ERROR TestQueryFabricsList_8() + CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query fabrics list Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + [cluster openBasicCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - } + NextTest(); + }]; - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_9() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\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\216L" + length:97]; + params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestQueryFabricsList_9() + CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_10() { - CHIPDevice * device = GetDevice("beta"); + CHIPDevice * device = GetDevice("alpha"); CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:true]; + params.fabricFiltered = [NSNumber numberWithBool:false]; [cluster readAttributeFabricsWithParams:params completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Query fabrics list Error: %@", err); + NSLog(@"TH_CR1 reads the list of Fabrics on DUT_CE Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(3))); VerifyOrReturn(CheckValueAsString("Label", ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[2]).label, @"")); } VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); @@ -36768,284 +36655,50 @@ class Test_TC_MF_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_10() + CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_11() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"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 = 180000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_11() + CHIP_ERROR TestThCr1ReOpensNewCommissioningWindowOnDutCe_12() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); + __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; + params.pakeVerifier = + [[NSData alloc] initWithBytes:"\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\216L" + length:97]; + params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; + params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; + params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; + [cluster openCommissioningWindowWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH_CR1 re-opens new commissioning window on DUT_CE Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1WritesTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_12() + CHIP_ERROR TestThCr3OpensANewCommissioningWindowOnDutCe_13() { - CHIPDevice * device = GetDevice("beta"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE " - @"Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1ReadsTheBasicInformationClustersNodeLabelMandatoryAttributeOfDutCe_13() - { - CHIPDevice * device = GetDevice("beta"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("nodeLabel", "", "string")); - VerifyOrReturn(CheckConstraintMaxLength("nodeLabel", [value length], 32)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MF_1_5 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_5() - : TestCommandBridge("Test_TC_MF_1_5") - , mTestIndex(0) - { - 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); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_MF_1_5() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_5\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_5\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); - err = TestRebootTargetDevice_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for PIXIT_COMM_WIN(180) + 10 seconds\n"); - err = TestWaitForPixitCommWin18010Seconds_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestThCr2StartsACommissioningProcessWithDutCe_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_13(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - 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), EMBER_ZCL_STATUS_FAILURE)); - 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(300)); } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; - - 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_ERROR TestRebootTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPDevice * device = GetDevice("gamma"); + CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; @@ -37061,32 +36714,57 @@ class Test_TC_MF_1_5 : public TestCommandBridge { params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; [cluster openCommissioningWindowWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NSLog(@"TH_CR3 opens a new commissioning window on DUT_CE Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitForPixitCommWin18010Seconds_3() + CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_14() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:false]; + [cluster readAttributeFabricsWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH_CR1 reads the list of Fabrics on DUT_CE Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); + VerifyOrReturn(CheckValueAsString("Label", + ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[2]).label, @"")); + } + + VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_4() + CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_15() { - 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("beta", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 180000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_5() + CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_16() { CHIPDevice * device = GetDevice("alpha"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device @@ -37117,96 +36795,9 @@ class Test_TC_MF_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() - { - 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("beta", value); - } - - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_10() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 read the mandatory attribute NodeLabel of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_11() + CHIP_ERROR TestThCr2OpensANewCommissioningWindowOnDutCe_17() { - CHIPDevice * device = GetDevice("alpha"); + CHIPDevice * device = GetDevice("beta"); CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; @@ -37225,52 +36816,39 @@ class Test_TC_MF_1_5 : public TestCommandBridge { params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; [cluster openCommissioningWindowWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NSLog(@"TH_CR2 opens a new commissioning window on DUT_CE Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_12() - { - 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("beta", value); - } - - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_13() - { - 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("gamma", value); - } }; -class Test_TC_MF_1_6 : public TestCommandBridge { +class OTA_SuccessfulTransfer : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_6() - : TestCommandBridge("Test_TC_MF_1_6") + OTA_SuccessfulTransfer() + : TestCommandBridge("OTA_SuccessfulTransfer") , mTestIndex(0) { - 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); + AddArgument("requestorNodeId", 0, UINT64_MAX, &mRequestorNodeId); + AddArgument("providerNodeId", 0, UINT64_MAX, &mProviderNodeId); + AddArgument("providerPayload", &mProviderPayload); + AddArgument("providerDiscriminator", 0, UINT16_MAX, &mProviderDiscriminator); + AddArgument("providerPort", 0, UINT16_MAX, &mProviderPort); + AddArgument("providerKvs", &mProviderKvs); + AddArgument("otaImageFilePath", &mOtaImageFilePath); + AddArgument("rawImageFilePath", &mRawImageFilePath); + AddArgument("rawImageContent", &mRawImageContent); + AddArgument("downloadImageFilePath", &mDownloadImageFilePath); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MF_1_6() {} + ~OTA_SuccessfulTransfer() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -37278,11 +36856,11 @@ class Test_TC_MF_1_6 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_6\n"); + ChipLogProgress(chipTool, " **** Test Start: OTA_SuccessfulTransfer\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: OTA_SuccessfulTransfer\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -37295,69 +36873,48 @@ class Test_TC_MF_1_6 : public TestCommandBridge { // incorrect mTestIndex value observed when we get the response. switch (mTestIndex++) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Stop target device\n"); - err = TestStopTargetDevice_0(); + ChipLogProgress(chipTool, " ***** Test Step 0 : Create OTA image\n"); + err = TestCreateOtaImage_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Start target device with the provided discriminator for basic commissioning advertisement\n"); - err = TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Start the provider with an image\n"); + err = TestStartTheProviderWithAnImage_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Commission the provider from alpha\n"); + err = TestCommissionTheProviderFromAlpha_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for the commissioned provider to be retrieved for alpha\n"); + err = TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Wait for PIXIT_COMM_WIN(180) + 10\n"); - err = TestWaitForPixitCommWin18010_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Install ACL for QueryImage\n"); + err = TestInstallAclForQueryImage_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Commission from beta\n"); - err = TestCommissionFromBeta_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Stop the requestor\n"); + err = TestStopTheRequestor_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Start the requestor with an OTA download path\n"); + err = TestStartTheRequestorWithAnOtaDownloadPath_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned requestor to be retrieved for alpha\n"); + err = TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Commission from beta\n"); - err = TestCommissionFromBeta_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Send an announce OTA provider command to the requestor\n"); + err = TestSendAnAnnounceOtaProviderCommandToTheRequestor_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 revokes the commissioning window on DUT_CE\n"); - err = TestThCr1RevokesTheCommissioningWindowOnDutCe_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for transfer complete message\n"); + err = TestWaitForTransferCompleteMessage_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH_CR1 read the mandatory attribute NodeLabel of DUT_CE\n"); - err = TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Commission from beta\n"); - err = TestCommissionFromBeta_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process on DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessOnDutCe_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_15(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Compare original file to downloaded file\n"); + err = TestCompareOriginalFileToDownloadedFile_10(); break; } @@ -37386,7 +36943,7 @@ class Test_TC_MF_1_6 : public TestCommandBridge { 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("status", chip::to_underlying(status.mStatus), 0)); break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -37395,283 +36952,219 @@ class Test_TC_MF_1_6 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - 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: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - 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(300)); } + 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; + const uint16_t mTestCount = 11; - 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::Optional mRequestorNodeId; + chip::Optional mProviderNodeId; + chip::Optional mProviderPayload; + chip::Optional mProviderDiscriminator; + chip::Optional mProviderPort; + chip::Optional mProviderKvs; + chip::Optional mOtaImageFilePath; + chip::Optional mRawImageFilePath; + chip::Optional mRawImageContent; + chip::Optional mDownloadImageFilePath; + chip::Optional mTimeout; - CHIP_ERROR TestStopTargetDevice_0() + CHIP_ERROR TestCreateOtaImage_0() { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); + chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; + value.otaImageFilePath + = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); + value.rawImageFilePath + = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); + value.rawImageContent + = mRawImageContent.HasValue() ? mRawImageContent.Value() : chip::Span("Have a hootenanny!", 18); + return CreateOtaImage("alpha", value); } - CHIP_ERROR TestStartTargetDeviceWithTheProvidedDiscriminatorForBasicCommissioningAdvertisement_1() + CHIP_ERROR TestStartTheProviderWithAnImage_1() { chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); value.discriminator.Emplace(); - value.discriminator.Value() = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + value.discriminator.Value() = mProviderDiscriminator.HasValue() ? mProviderDiscriminator.Value() : 50U; + value.port.Emplace(); + value.port.Value() = mProviderPort.HasValue() ? mProviderPort.Value() : 5560U; + value.kvs.Emplace(); + value.kvs.Value() = mProviderKvs.HasValue() ? mProviderKvs.Value() : chip::Span("/tmp/chip_kvs_provider", 22); + value.filepath.Emplace(); + value.filepath.Value() + = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); return Start("alpha", value); } - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_2() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWaitForPixitCommWin18010_4() + CHIP_ERROR TestCommissionTheProviderFromAlpha_2() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs("alpha", value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + value.payload + = mProviderPayload.HasValue() ? mProviderPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); + return PairWithCode("alpha", value); } - CHIP_ERROR TestCommissionFromBeta_5() + CHIP_ERROR TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3() { - 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("beta", value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_6() + CHIP_ERROR TestInstallAclForQueryImage_4() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; + } + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - return CHIP_NO_ERROR; - } + temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2U]; + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [[CHIPAccessControlClusterTarget alloc] init]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).cluster = [NSNumber numberWithUnsignedInt:41UL]; + ((CHIPAccessControlClusterTarget *) temp_3[0]).endpoint = nil; + ((CHIPAccessControlClusterTarget *) temp_3[0]).deviceType = nil; - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; + } + ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; - [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); + aclArgument = temp_0; + } + [cluster writeAttributeAclWithValue:aclArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Install ACL for QueryImage 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 TestCommissionFromBeta_8() - { - 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("beta", value); - } - - CHIP_ERROR TestThCr1RevokesTheCommissioningWindowOnDutCe_9() + CHIP_ERROR TestStopTheRequestor_5() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster revokeCommissioningWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 revokes the commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Stop::Type value; + return Stop("alpha", value); } - CHIP_ERROR TestThCr1WritesTheMandatoryAttributeNodeLabelOfDutCe_10() + CHIP_ERROR TestStartTheRequestorWithAnOtaDownloadPath_6() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id nodeLabelArgument; - nodeLabelArgument = @"chiptest"; - [cluster writeAttributeNodeLabelWithValue:nodeLabelArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::SystemCommands::Commands::Start::Type value; + value.otaDownloadPath.Emplace(); + value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() + : chip::Span("/tmp/downloadedImage", 20); + return Start("alpha", value); } - CHIP_ERROR TestThCr1ReadTheMandatoryAttributeNodeLabelOfDutCe_11() + CHIP_ERROR TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7() { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestBasic * cluster = [[CHIPTestBasic alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeNodeLabelWithCompletionHandler:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 read the mandatory attribute NodeLabel of DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValueAsString("NodeLabel", actualValue, @"chiptest")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_12() + CHIP_ERROR TestSendAnAnnounceOtaProviderCommandToTheRequestor_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device + CHIPTestOtaSoftwareUpdateRequestor * cluster = [[CHIPTestOtaSoftwareUpdateRequestor alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); + __auto_type * params = [[CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; + params.providerNodeId = mProviderNodeId.HasValue() ? [NSNumber numberWithUnsignedLongLong:mProviderNodeId.Value()] + : [NSNumber numberWithUnsignedLongLong:12648430ULL]; + params.vendorId = [NSNumber numberWithUnsignedShort:0U]; + params.announcementReason = [NSNumber numberWithUnsignedChar:0U]; + params.endpoint + = mEndpoint.HasValue() ? [NSNumber numberWithUnsignedShort:mEndpoint.Value()] : [NSNumber numberWithUnsignedShort:0U]; + [cluster announceOtaProviderWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Send an announce OTA provider command to the requestor 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 TestCommissionFromBeta_13() - { - 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("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessOnDutCe_14() + CHIP_ERROR TestWaitForTransferCompleteMessage_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee("beta", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; + value.registerKey.Emplace(); + value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); + value.message = chip::Span("OTA image downloadedgarbage: not in length on purpose", 20); + return WaitForMessage("alpha", value); } - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_15() + CHIP_ERROR TestCompareOriginalFileToDownloadedFile_10() { - 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("gamma", value); + chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; + value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); + value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() + : chip::Span("/tmp/downloadedImage", 20); + return CompareFiles("alpha", value); } }; -class Test_TC_MF_1_9 : public TestCommandBridge { +class Test_TC_OCC_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_9() - : TestCommandBridge("Test_TC_MF_1_9") + Test_TC_OCC_1_1() + : TestCommandBridge("Test_TC_OCC_1_1") , mTestIndex(0) { 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("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("payload2", &mPayload2); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MF_1_9() {} + ~Test_TC_OCC_1_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -37679,11 +37172,11 @@ class Test_TC_MF_1_9 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -37696,125 +37189,56 @@ class Test_TC_MF_1_9 : public TestCommandBridge { // 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(); + 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 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); break; case 3: ChipLogProgress( - chipTool, " ***** Test Step 3 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3(); + chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_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")) { + NextTest(); + return; + } + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; case 9: ChipLogProgress( - chipTool, " ***** Test Step 9 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9(); - break; - case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11(); - break; - case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12(); - break; - case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13(); - break; - case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14(); - break; - case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15(); - break; - case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16(); - break; - case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17(); - break; - case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18(); - break; - case 19: - ChipLogProgress( - chipTool, " ***** Test Step 19 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19(); - break; - case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20(); - break; - case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21(); - break; - case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22(); - break; - case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_24(); + chipTool, " ***** Test Step 9 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); + if (ShouldSkip("PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9(); break; } @@ -37837,70 +37261,25 @@ class Test_TC_MF_1_9 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 3: - 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 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - 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)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 21: - 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), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -37908,264 +37287,212 @@ class Test_TC_MF_1_9 : public TestCommandBridge { ContinueOnChipMainThread(CHIP_NO_ERROR); } - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } + 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; + const uint16_t mTestCount = 10; chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mPayload2; - - CHIP_ERROR TestRebootTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + chip::Optional mTimeout; - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() + 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 TestThCr1OpensANewCommissioningWindowOnDutCe_2() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\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\216L" - length:97]; - params.discriminator = mDiscriminator.HasValue() ? [NSNumber numberWithUnsignedShort:mDiscriminator.Value()] - : [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3() + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_6() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + NextTest(); + }]; - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + id clusterRevisionArgument; + clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; + [cluster + writeAttributeClusterRevisionWithValue:clusterRevisionArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12() + CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + NextTest(); + }]; - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", 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 TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_24() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9() { - 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("gamma", value); + 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("alpha", value); } }; -class Test_TC_MF_1_10 : public TestCommandBridge { +class Test_TC_OCC_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_10() - : TestCommandBridge("Test_TC_MF_1_10") + Test_TC_OCC_2_1() + : TestCommandBridge("Test_TC_OCC_2_1") , mTestIndex(0) { 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("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("payload2", &mPayload2); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_MF_1_10() {} + ~Test_TC_OCC_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -38173,11 +37500,11 @@ class Test_TC_MF_1_10 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_10\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_10\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -38190,624 +37517,343 @@ class Test_TC_MF_1_10 : public TestCommandBridge { // 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(); + 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 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attribute constrains: Occupancy\n"); + err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_2(); + ChipLogProgress( + chipTool, " ***** Test Step 2 : Writes the respective default value to mandatory attribute: Occupancy\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2(); break; case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads back mandatory attribute: Occupancy\n"); + err = TestReadsBackMandatoryAttributeOccupancy_3(); break; case 4: - ChipLogProgress( - chipTool, " ***** Test Step 4 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attribute: OccupancySensorType\n"); + err = TestReadsMandatoryAttributeOccupancySensorType_4(); break; case 5: - ChipLogProgress( - chipTool, " ***** Test Step 5 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attribute constrains: OccupancySensorType\n"); + err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_5(); break; case 6: ChipLogProgress( - chipTool, " ***** Test Step 6 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_6(); + chipTool, " ***** Test Step 6 : Writes the respective default value to mandatory attribute: OccupancySensorType\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_6(); break; case 7: - ChipLogProgress( - chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads back mandatory attribute: OccupancySensorType\n"); + err = TestReadsBackMandatoryAttributeOccupancySensorType_7(); break; case 8: - ChipLogProgress( - chipTool, " ***** Test Step 8 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); + err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_8(); break; case 9: - ChipLogProgress( - chipTool, " ***** Test Step 9 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9(); + ChipLogProgress(chipTool, + " ***** Test Step 9 : Writes the respective default value to mandatory attribute: OccupancySensorTypeBitmap\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_9(); break; case 10: - ChipLogProgress( - chipTool, " ***** Test Step 10 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads back mandatory attribute: OccupancySensorTypeBitmap\n"); + err = TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_10(); break; case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads optional attribute: PIROccupiedToUnoccupiedDelay\n"); + err = TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_11(); break; case 12: - ChipLogProgress( - chipTool, " ***** Test Step 12 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12(); + ChipLogProgress(chipTool, + " ***** Test Step 12 : Writes the respective default value to optional attribute: PIROccupiedToUnoccupiedDelay\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIROccupiedToUnoccupiedDelay_12(); break; case 13: - ChipLogProgress( - chipTool, " ***** Test Step 13 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads back optional attribute: PIROccupiedToUnoccupiedDelay\n"); + err = TestReadsBackOptionalAttributePIROccupiedToUnoccupiedDelay_13(); break; case 14: - ChipLogProgress( - chipTool, " ***** Test Step 14 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads optional attribute: PIRUnoccupiedToOccupiedDelay\n"); + err = TestReadsOptionalAttributePIRUnoccupiedToOccupiedDelay_14(); break; case 15: - ChipLogProgress( - chipTool, " ***** Test Step 15 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay\n"); + err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_15(); break; case 16: - ChipLogProgress( - chipTool, " ***** Test Step 16 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16(); + ChipLogProgress(chipTool, + " ***** Test Step 16 : Writes the respective default value to optional attribute: PIRUnoccupiedToOccupiedDelay\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedDelay_16(); break; case 17: - ChipLogProgress( - chipTool, " ***** Test Step 17 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads back optional attribute: PIRUnoccupiedToOccupiedDelay\n"); + err = TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedDelay_17(); break; case 18: - ChipLogProgress( - chipTool, " ***** Test Step 18 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Reads optional attribute: PIRUnoccupiedToOccupiedThreshold\n"); + err = TestReadsOptionalAttributePIRUnoccupiedToOccupiedThreshold_18(); break; case 19: ChipLogProgress( - chipTool, " ***** Test Step 19 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19(); + chipTool, " ***** Test Step 19 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold\n"); + err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_19(); break; case 20: - ChipLogProgress( - chipTool, " ***** Test Step 20 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20(); + ChipLogProgress(chipTool, + " ***** Test Step 20 : Writes the respective default value to optional attribute: " + "PIRUnoccupiedToOccupiedThreshold\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedThreshold_20(); break; case 21: - ChipLogProgress( - chipTool, " ***** Test Step 21 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21(); + ChipLogProgress(chipTool, " ***** Test Step 21 : Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold\n"); + err = TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedThreshold_21(); break; case 22: - ChipLogProgress( - chipTool, " ***** Test Step 22 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); + err = TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_22(); break; case 23: - ChipLogProgress( - chipTool, " ***** Test Step 23 : TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code\n"); - err = TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23(); + ChipLogProgress(chipTool, + " ***** Test Step 23 : Writes the respective default value to optional attribute: " + "UltrasonicOccupiedToUnoccupiedDelay\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_24(); - 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)); + ChipLogProgress(chipTool, " ***** Test Step 24 : Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); + err = TestReadBackOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_24(); break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Read attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); + err = TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_25(); break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 26: + ChipLogProgress(chipTool, + " ***** Test Step 26 : Writes the respective default value to optional attribute: " + "UltrasonicUnoccupiedToOccupiedDelay\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedDelay_26(); break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Read back attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); + err = TestReadBackAttributeUltrasonicUnoccupiedToOccupiedDelay_27(); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); + err = TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_28(); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 29: + ChipLogProgress(chipTool, + " ***** Test Step 29 : Writes the respective default value to optional attribute: " + "UltrasonicUnoccupiedToOccupiedThreshold\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedThreshold_29(); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); + err = TestReadBackAttributeUltrasonicUnoccupiedToOccupiedThreshold_30(); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay\n"); + err = TestReadsOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_31(); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 32: + ChipLogProgress( + chipTool, " ***** Test Step 32 : Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay\n"); + err = TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_32(); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 33: + ChipLogProgress(chipTool, + " ***** Test Step 33 : Writes the respective default value to optional attribute: " + "PhysicalContactOccupiedToUnoccupiedDelay\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_33(); break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 34: + ChipLogProgress( + chipTool, " ***** Test Step 34 : Reads back optional attribute: PhysicalContactOccupiedToUnoccupiedDelay\n"); + err = TestReadsBackOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_34(); break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay\n"); + err = TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_35(); break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 36: + ChipLogProgress( + chipTool, " ***** Test Step 36 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay\n"); + err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_36(); 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)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 37: + ChipLogProgress(chipTool, + " ***** Test Step 37 : Writes the respective default value to optional attribute: " + "PhysicalContactUnoccupiedToOccupiedDelay\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_37(); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 38: + ChipLogProgress( + chipTool, " ***** Test Step 38 : Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedDelay\n"); + err = TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_38(); break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 39: + ChipLogProgress( + chipTool, " ***** Test Step 39 : Reads optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold\n"); + err = TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_39(); break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 40: + ChipLogProgress(chipTool, + " ***** Test Step 40 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold\n"); + err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_40(); break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 41: + ChipLogProgress(chipTool, + " ***** Test Step 41 : Writes the respective default value to optional attribute: " + "PhysicalContactUnoccupiedToOccupiedThreshold\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_41(); break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 42: + ChipLogProgress( + chipTool, " ***** Test Step 42 : Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold\n"); + err = TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_42(); 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(700)); } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 25; - - 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::Optional mPayload2; - - CHIP_ERROR TestRebootTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } - - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_3() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_4() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_5() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_6() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_7() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_8() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_9() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_10() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_11() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_12() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_13() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_14() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_15() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_16() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_17() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_18() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_19() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_20() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_21() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_22() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCeUsingInvalidSetupCode_23() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload2.HasValue() ? mPayload2.Value() : chip::Span("MT:0000000000I.0648G00", 22); - return PairWithCode("beta", value); - } - - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_24() - { - 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("gamma", value); - } -}; - -class Test_TC_MF_1_15 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MF_1_15() - : TestCommandBridge("Test_TC_MF_1_15") - , mTestIndex(0) - { - 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); + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_MF_1_15() {} - /////////// TestCommand Interface ///////// - void NextTest() override + void OnStatusUpdate(const chip::app::StatusIB & status) override { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_15\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_15\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++) { + switch (mTestIndex - 1) { case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Reboot target device\n"); - err = TestRebootTargetDevice_0(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH_CR1 starts a commissioning process with DUT_CE\n"); - err = TestThCr1StartsACommissioningProcessWithDutCe_1(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_2(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Commission from gamma\n"); - err = TestCommissionFromGamma_3(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH_CR3 starts a commissioning process with DUT_CE\n"); - err = TestThCr3StartsACommissioningProcessWithDutCe_4(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_5(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Commission from beta\n"); - err = TestCommissionFromBeta_6(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH_CR2 starts a commissioning process with DUT_CE\n"); - err = TestThCr2StartsACommissioningProcessWithDutCe_7(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH_CR1 opens a commissioning window on DUT_CE\n"); - err = TestThCr1OpensACommissioningWindowOnDutCe_8(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_9(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH_CR1 reads the list of Fabrics on DUT_CE\n"); - err = TestThCr1ReadsTheListOfFabricsOnDutCe_10(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_11(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH_CR1 re-opens new commissioning window on DUT_CE\n"); - err = TestThCr1ReOpensNewCommissioningWindowOnDutCe_12(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH_CR3 opens a new commissioning window on DUT_CE\n"); - err = TestThCr3OpensANewCommissioningWindowOnDutCe_13(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH_CR1 reads the list of Fabrics on DUT_CE\n"); - err = TestThCr1ReadsTheListOfFabricsOnDutCe_14(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait for the expiration of PIXIT_COMM_WIN seconds\n"); - err = TestWaitForTheExpirationOfPixitCommWinSeconds_15(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH_CR1 opens a new commissioning window on DUT_CE\n"); - err = TestThCr1OpensANewCommissioningWindowOnDutCe_16(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH_CR2 opens a new commissioning window on DUT_CE\n"); - err = TestThCr2OpensANewCommissioningWindowOnDutCe_17(); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); 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: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 1: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 2: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 3: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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; } @@ -38815,863 +37861,488 @@ class Test_TC_MF_1_15 : public TestCommandBridge { ContinueOnChipMainThread(CHIP_NO_ERROR); } - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(500)); } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 43; chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - - CHIP_ERROR TestRebootTargetDevice_0() - { - chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; - return Reboot("alpha", value); - } + chip::Optional mTimeout; - CHIP_ERROR TestThCr1StartsACommissioningProcessWithDutCe_1() + 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 TestThCr1OpensACommissioningWindowOnDutCe_2() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancy_1() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); + [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCommissionFromGamma_3() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2() { - 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("gamma", value); - } - - CHIP_ERROR TestThCr3StartsACommissioningProcessWithDutCe_4() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee("gamma", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupancyArgument; + occupancyArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOccupancyWithValue:occupancyArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to mandatory attribute: Occupancy Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_5() + CHIP_ERROR TestReadsBackMandatoryAttributeOccupancy_3() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); + [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back mandatory attribute: Occupancy Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("occupancy", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCommissionFromBeta_6() + CHIP_ERROR TestReadsMandatoryAttributeOccupancySensorType_4() { - 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("beta", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute: OccupancySensorType Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("occupancy sensor type", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2StartsACommissioningProcessWithDutCe_7() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_5() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee("beta", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensACommissioningWindowOnDutCe_8() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_6() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - [cluster openBasicCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a commissioning window on DUT_CE Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id occupancySensorTypeArgument; + occupancySensorTypeArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOccupancySensorTypeWithValue:occupancySensorTypeArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to mandatory attribute: " + @"OccupancySensorType Error: %@", + err); - NextTest(); - }]; + VerifyOrReturn( + CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_9() + CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorType_7() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\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\216L" - length:97]; - params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); + [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back mandatory attribute: OccupancySensorType Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_10() + CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_8() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:false]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the list of Fabrics on DUT_CE Error: %@", err); + [cluster + readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[2]).label, @"")); - } + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_11() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id occupancySensorTypeBitmapArgument; + occupancySensorTypeBitmapArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributeOccupancySensorTypeBitmapWithValue:occupancySensorTypeBitmapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to mandatory attribute: " + @"OccupancySensorTypeBitmap Error: %@", + err); + + VerifyOrReturn(CheckValue( + "status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReOpensNewCommissioningWindowOnDutCe_12() + CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_10() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\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\216L" - length:97]; - params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 re-opens new commissioning window on DUT_CE Error: %@", err); + [cluster + readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back mandatory attribute: OccupancySensorTypeBitmap Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); + VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr3OpensANewCommissioningWindowOnDutCe_13() + CHIP_ERROR TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_11() { - CHIPDevice * device = GetDevice("gamma"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\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\216L" - length:97]; - params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR3 opens a new commissioning window on DUT_CE Error: %@", err); + [cluster + readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1ReadsTheListOfFabricsOnDutCe_14() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIROccupiedToUnoccupiedDelay_12() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOperationalCredentials * cluster = [[CHIPTestOperationalCredentials alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - CHIPReadParams * params = [[CHIPReadParams alloc] init]; - params.fabricFiltered = [NSNumber numberWithBool:false]; - [cluster readAttributeFabricsWithParams:params - completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH_CR1 reads the list of Fabrics on DUT_CE Error: %@", err); + id pirOccupiedToUnoccupiedDelayArgument; + pirOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributePirOccupiedToUnoccupiedDelayWithValue:pirOccupiedToUnoccupiedDelayArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"PIROccupiedToUnoccupiedDelay Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[1]).label, @"")); - VerifyOrReturn(CheckValueAsString("Label", - ((CHIPOperationalCredentialsClusterFabricDescriptor *) actualValue[2]).label, @"")); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("fabrics", "", "list")); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitForTheExpirationOfPixitCommWinSeconds_15() + CHIP_ERROR TestReadsBackOptionalAttributePIROccupiedToUnoccupiedDelay_13() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr1OpensANewCommissioningWindowOnDutCe_16() + CHIP_ERROR TestReadsOptionalAttributePIRUnoccupiedToOccupiedDelay_14() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\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\216L" - length:97]; - params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR1 opens a new commissioning window on DUT_CE Error: %@", err); + [cluster + readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute: PIRUnoccupiedToOccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThCr2OpensANewCommissioningWindowOnDutCe_17() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_15() { - CHIPDevice * device = GetDevice("beta"); - CHIPTestAdministratorCommissioning * cluster = [[CHIPTestAdministratorCommissioning alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:180U]; - params.pakeVerifier = - [[NSData alloc] initWithBytes:"\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\216L" - length:97]; - params.discriminator = [NSNumber numberWithUnsignedShort:3840U]; - params.iterations = [NSNumber numberWithUnsignedInt:1000UL]; - params.salt = [[NSData alloc] initWithBytes:"SPAKE2P Key Salt" length:16]; - [cluster openCommissioningWindowWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH_CR2 opens a new commissioning window on DUT_CE Error: %@", err); + [cluster + readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "", "uint16")); + NextTest(); + }]; return CHIP_NO_ERROR; } -}; -class OTA_SuccessfulTransfer : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - OTA_SuccessfulTransfer() - : TestCommandBridge("OTA_SuccessfulTransfer") - , mTestIndex(0) + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedDelay_16() { - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("requestorNodeId", 0, UINT64_MAX, &mRequestorNodeId); - AddArgument("providerNodeId", 0, UINT64_MAX, &mProviderNodeId); - AddArgument("providerPayload", &mProviderPayload); - AddArgument("providerDiscriminator", 0, UINT16_MAX, &mProviderDiscriminator); - AddArgument("providerPort", 0, UINT16_MAX, &mProviderPort); - AddArgument("providerKvs", &mProviderKvs); - AddArgument("otaImageFilePath", &mOtaImageFilePath); - AddArgument("rawImageFilePath", &mRawImageFilePath); - AddArgument("rawImageContent", &mRawImageContent); - AddArgument("downloadImageFilePath", &mDownloadImageFilePath); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - ~OTA_SuccessfulTransfer() {} + id pirUnoccupiedToOccupiedDelayArgument; + pirUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributePirUnoccupiedToOccupiedDelayWithValue:pirUnoccupiedToOccupiedDelayArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"PIRUnoccupiedToOccupiedDelay Error: %@", + err); - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: OTA_SuccessfulTransfer\n"); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: OTA_SuccessfulTransfer\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + NextTest(); + }]; - Wait(); + return CHIP_NO_ERROR; + } - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Create OTA image\n"); - err = TestCreateOtaImage_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Start the provider with an image\n"); - err = TestStartTheProviderWithAnImage_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Commission the provider from alpha\n"); - err = TestCommissionTheProviderFromAlpha_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Wait for the commissioned provider to be retrieved for alpha\n"); - err = TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Install ACL for QueryImage\n"); - err = TestInstallAclForQueryImage_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Stop the requestor\n"); - err = TestStopTheRequestor_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Start the requestor with an OTA download path\n"); - err = TestStartTheRequestorWithAnOtaDownloadPath_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait for the commissioned requestor to be retrieved for alpha\n"); - err = TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Send an announce OTA provider command to the requestor\n"); - err = TestSendAnAnnounceOtaProviderCommandToTheRequestor_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait for transfer complete message\n"); - err = TestWaitForTransferCompleteMessage_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Compare original file to downloaded file\n"); - err = TestCompareOriginalFileToDownloadedFile_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 mEndpoint; - chip::Optional mRequestorNodeId; - chip::Optional mProviderNodeId; - chip::Optional mProviderPayload; - chip::Optional mProviderDiscriminator; - chip::Optional mProviderPort; - chip::Optional mProviderKvs; - chip::Optional mOtaImageFilePath; - chip::Optional mRawImageFilePath; - chip::Optional mRawImageContent; - chip::Optional mDownloadImageFilePath; - chip::Optional mTimeout; - - CHIP_ERROR TestCreateOtaImage_0() - { - chip::app::Clusters::SystemCommands::Commands::CreateOtaImage::Type value; - value.otaImageFilePath - = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - value.rawImageFilePath - = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.rawImageContent - = mRawImageContent.HasValue() ? mRawImageContent.Value() : chip::Span("Have a hootenanny!", 18); - return CreateOtaImage("alpha", value); - } - - CHIP_ERROR TestStartTheProviderWithAnImage_1() - { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("chip-ota-provider-appgarbage: not in length on purpose", 21); - value.discriminator.Emplace(); - value.discriminator.Value() = mProviderDiscriminator.HasValue() ? mProviderDiscriminator.Value() : 50U; - value.port.Emplace(); - value.port.Value() = mProviderPort.HasValue() ? mProviderPort.Value() : 5560U; - value.kvs.Emplace(); - value.kvs.Value() = mProviderKvs.HasValue() ? mProviderKvs.Value() : chip::Span("/tmp/chip_kvs_provider", 22); - value.filepath.Emplace(); - value.filepath.Value() - = mOtaImageFilePath.HasValue() ? mOtaImageFilePath.Value() : chip::Span("/tmp/otaImage", 13); - return Start("alpha", value); - } - - CHIP_ERROR TestCommissionTheProviderFromAlpha_2() - { - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - value.payload - = mProviderPayload.HasValue() ? mProviderPayload.Value() : chip::Span("MT:-24J0IX4122-.548G00", 22); - return PairWithCode("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedProviderToBeRetrievedForAlpha_3() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mProviderNodeId.HasValue() ? mProviderNodeId.Value() : 12648430ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestInstallAclForQueryImage_4() + CHIP_ERROR TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedDelay_17() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestAccessControl * cluster = [[CHIPTestAccessControl alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2]; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedLongLong:112233ULL]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).subjects = temp_3; - } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).targets = nil; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1]; - - temp_0[1] = [[CHIPAccessControlClusterAccessControlEntry alloc] init]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:2]; - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).subjects = nil; - { - NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [[CHIPAccessControlClusterTarget alloc] init]; - ((CHIPAccessControlClusterTarget *) temp_3[0]).cluster = [NSNumber numberWithUnsignedInt:41UL]; - ((CHIPAccessControlClusterTarget *) temp_3[0]).endpoint = nil; - ((CHIPAccessControlClusterTarget *) temp_3[0]).deviceType = nil; + [cluster + readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: PIRUnoccupiedToOccupiedDelay Error: %@", err); - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).targets = temp_3; - } - ((CHIPAccessControlClusterAccessControlEntry *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1]; + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - aclArgument = temp_0; - } - [cluster writeAttributeAclWithValue:aclArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Install ACL for QueryImage Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestStopTheRequestor_5() - { - chip::app::Clusters::SystemCommands::Commands::Stop::Type value; - return Stop("alpha", value); - } - - CHIP_ERROR TestStartTheRequestorWithAnOtaDownloadPath_6() - { - chip::app::Clusters::SystemCommands::Commands::Start::Type value; - value.otaDownloadPath.Emplace(); - value.otaDownloadPath.Value() = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return Start("alpha", value); - } - - CHIP_ERROR TestWaitForTheCommissionedRequestorToBeRetrievedForAlpha_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mRequestorNodeId.HasValue() ? mRequestorNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestSendAnAnnounceOtaProviderCommandToTheRequestor_8() + CHIP_ERROR TestReadsOptionalAttributePIRUnoccupiedToOccupiedThreshold_18() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOtaSoftwareUpdateRequestor * cluster = [[CHIPTestOtaSoftwareUpdateRequestor alloc] initWithDevice:device - endpoint:0 - queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[CHIPOtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams alloc] init]; - params.providerNodeId = mProviderNodeId.HasValue() ? [NSNumber numberWithUnsignedLongLong:mProviderNodeId.Value()] - : [NSNumber numberWithUnsignedLongLong:12648430ULL]; - params.vendorId = [NSNumber numberWithUnsignedShort:0U]; - params.announcementReason = [NSNumber numberWithUnsignedChar:0]; - params.endpoint - = mEndpoint.HasValue() ? [NSNumber numberWithUnsignedShort:mEndpoint.Value()] : [NSNumber numberWithUnsignedShort:0U]; - [cluster announceOtaProviderWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Send an announce OTA provider command to the requestor Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWaitForTransferCompleteMessage_9() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMessage::Type value; - value.registerKey.Emplace(); - value.registerKey.Value() = chip::Span("defaultgarbage: not in length on purpose", 7); - value.message = chip::Span("OTA image downloadedgarbage: not in length on purpose", 20); - return WaitForMessage("alpha", value); - } - - CHIP_ERROR TestCompareOriginalFileToDownloadedFile_10() - { - chip::app::Clusters::SystemCommands::Commands::CompareFiles::Type value; - value.file1 = mRawImageFilePath.HasValue() ? mRawImageFilePath.Value() : chip::Span("/tmp/rawImage", 13); - value.file2 = mDownloadImageFilePath.HasValue() ? mDownloadImageFilePath.Value() - : chip::Span("/tmp/downloadedImage", 20); - return CompareFiles("alpha", value); - } -}; - -class Test_TC_OCC_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OCC_1_1() - : TestCommandBridge("Test_TC_OCC_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_OCC_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); + [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute: PIRUnoccupiedToOccupiedThreshold Error: %@", err); - // 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 constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); - err = TestReadsBackGlobalAttributeClusterRevision_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_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")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 9 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); return; } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9(); - 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), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR 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() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1U)); } NextTest(); @@ -39680,7 +38351,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_19() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39688,19 +38359,28 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute constraints: ClusterRevision Error: %@", err); + [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); + VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedThreshold_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39708,22 +38388,28 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id clusterRevisionArgument; - clusterRevisionArgument = [NSNumber numberWithUnsignedShort:3U]; - [cluster - writeAttributeClusterRevisionWithValue:clusterRevisionArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"write the default values to mandatory global attribute: ClusterRevision Error: %@", err); + id pirUnoccupiedToOccupiedThresholdArgument; + pirUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster writeAttributePirUnoccupiedToOccupiedThresholdWithValue:pirUnoccupiedToOccupiedThresholdArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"PIRUnoccupiedToOccupiedThreshold Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + CHIP_ERROR TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedThreshold_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39731,14 +38417,20 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1U)); } NextTest(); @@ -39747,7 +38439,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_5() + CHIP_ERROR TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39755,28 +38447,30 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { 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 readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); + } + + VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "", "uint16")); 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); - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_7() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_23() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39784,19 +38478,28 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { 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); + id ultrasonicOccupiedToUnoccupiedDelayArgument; + ultrasonicOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:ultrasonicOccupiedToUnoccupiedDelayArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"UltrasonicOccupiedToUnoccupiedDelay Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_8() + CHIP_ERROR TestReadBackOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_24() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -39804,433 +38507,89 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { 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 readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_9() - { - 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("alpha", value); - } -}; - -class Test_TC_OCC_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OCC_2_1() - : TestCommandBridge("Test_TC_OCC_2_1") - , mTestIndex(0) + CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_25() { - 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_OCC_2_1() {} + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_1\n"); - } + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - Wait(); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", 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 : Reads mandatory attribute constrains: Occupancy\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancy_1(); - break; - case 2: - ChipLogProgress( - chipTool, " ***** Test Step 2 : Writes the respective default value to mandatory attribute: Occupancy\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads back mandatory attribute: Occupancy\n"); - err = TestReadsBackMandatoryAttributeOccupancy_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads mandatory attribute: OccupancySensorType\n"); - err = TestReadsMandatoryAttributeOccupancySensorType_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attribute constrains: OccupancySensorType\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancySensorType_5(); - break; - case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Writes the respective default value to mandatory attribute: OccupancySensorType\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads back mandatory attribute: OccupancySensorType\n"); - err = TestReadsBackMandatoryAttributeOccupancySensorType_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads mandatory attribute constrains: OccupancySensorTypeBitmap\n"); - err = TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_8(); - break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Writes the respective default value to mandatory attribute: OccupancySensorTypeBitmap\n"); - err = TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads back mandatory attribute: OccupancySensorTypeBitmap\n"); - err = TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads optional attribute: PIROccupiedToUnoccupiedDelay\n"); - err = TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_11(); - break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Writes the respective default value to optional attribute: PIROccupiedToUnoccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIROccupiedToUnoccupiedDelay_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads back optional attribute: PIROccupiedToUnoccupiedDelay\n"); - err = TestReadsBackOptionalAttributePIROccupiedToUnoccupiedDelay_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads optional attribute: PIRUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributePIRUnoccupiedToOccupiedDelay_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_15(); - break; - case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : Writes the respective default value to optional attribute: PIRUnoccupiedToOccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedDelay_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads back optional attribute: PIRUnoccupiedToOccupiedDelay\n"); - err = TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedDelay_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads optional attribute: PIRUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributePIRUnoccupiedToOccupiedThreshold_18(); - break; - case 19: - ChipLogProgress( - chipTool, " ***** Test Step 19 : Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_19(); - break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Writes the respective default value to optional attribute: " - "PIRUnoccupiedToOccupiedThreshold\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedThreshold_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold\n"); - err = TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedThreshold_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); - err = TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_22(); - break; - case 23: - ChipLogProgress(chipTool, - " ***** Test Step 23 : Writes the respective default value to optional attribute: " - "UltrasonicOccupiedToUnoccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay\n"); - err = TestReadBackOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); - err = TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_25(); - break; - case 26: - ChipLogProgress(chipTool, - " ***** Test Step 26 : Writes the respective default value to optional attribute: " - "UltrasonicUnoccupiedToOccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedDelay_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read back attribute: UltrasonicUnoccupiedToOccupiedDelay\n"); - err = TestReadBackAttributeUltrasonicUnoccupiedToOccupiedDelay_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); - err = TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_28(); - break; - case 29: - ChipLogProgress(chipTool, - " ***** Test Step 29 : Writes the respective default value to optional attribute: " - "UltrasonicUnoccupiedToOccupiedThreshold\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedThreshold_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold\n"); - err = TestReadBackAttributeUltrasonicUnoccupiedToOccupiedThreshold_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestReadsOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_31(); - break; - case 32: - ChipLogProgress( - chipTool, " ***** Test Step 32 : Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_32(); - break; - case 33: - ChipLogProgress(chipTool, - " ***** Test Step 33 : Writes the respective default value to optional attribute: " - "PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_33(); - break; - case 34: - ChipLogProgress( - chipTool, " ***** Test Step 34 : Reads back optional attribute: PhysicalContactOccupiedToUnoccupiedDelay\n"); - err = TestReadsBackOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_35(); - break; - case 36: - ChipLogProgress( - chipTool, " ***** Test Step 36 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_36(); - break; - case 37: - ChipLogProgress(chipTool, - " ***** Test Step 37 : Writes the respective default value to optional attribute: " - "PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_37(); - break; - case 38: - ChipLogProgress( - chipTool, " ***** Test Step 38 : Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedDelay\n"); - err = TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_38(); - break; - case 39: - ChipLogProgress( - chipTool, " ***** Test Step 39 : Reads optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_39(); - break; - case 40: - ChipLogProgress(chipTool, - " ***** Test Step 40 : Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_40(); - break; - case 41: - ChipLogProgress(chipTool, - " ***** Test Step 41 : Writes the respective default value to optional attribute: " - "PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_41(); - break; - case 42: - ChipLogProgress( - chipTool, " ***** Test Step 42 : Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold\n"); - err = TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_42(); - break; - } + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "", "uint16")); + 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 TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedDelay_26() { - 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), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - 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), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - 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), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - 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; - } + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing 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 ultrasonicUnoccupiedToOccupiedDelayArgument; + ultrasonicUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:ultrasonicUnoccupiedToOccupiedDelayArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"UltrasonicUnoccupiedToOccupiedDelay Error: %@", + err); - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 43; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - 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 TestReadsMandatoryAttributeConstrainsOccupancy_1() + CHIP_ERROR TestReadBackAttributeUltrasonicUnoccupiedToOccupiedDelay_27() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -40238,14 +38597,21 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: Occupancy Error: %@", err); + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read back attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("occupancy", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("occupancy", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("occupancy", [value unsignedCharValue], 1)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); + } NextTest(); }]; @@ -40253,7 +38619,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancy_2() + CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_28() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -40261,130 +38627,27 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id occupancyArgument; - occupancyArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeOccupancyWithValue:occupancyArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attribute: Occupancy Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancy_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancyWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: Occupancy Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("occupancy", actualValue, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributeOccupancySensorType_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute: OccupancySensorType Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("occupancy sensor type", actualValue, 0)); + VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1U)); } - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorType_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorType Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorType_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupancySensorTypeArgument; - occupancySensorTypeArgument = [NSNumber numberWithUnsignedChar:0]; - [cluster writeAttributeOccupancySensorTypeWithValue:occupancySensorTypeArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attribute: " - @"OccupancySensorType Error: %@", - err); - - VerifyOrReturn( - CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorType_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOccupancySensorTypeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: OccupancySensorType Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorType", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorType", [value unsignedCharValue], 3)); + VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "", "uint16")); + VerifyOrReturn( + CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -40392,254 +38655,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsMandatoryAttributeConstrainsOccupancySensorTypeBitmap_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads mandatory attribute constrains: OccupancySensorTypeBitmap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributeOccupancySensorTypeBitmap_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id occupancySensorTypeBitmapArgument; - occupancySensorTypeBitmapArgument = [NSNumber numberWithUnsignedChar:1]; - [cluster writeAttributeOccupancySensorTypeBitmapWithValue:occupancySensorTypeBitmapArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to mandatory attribute: " - @"OccupancySensorTypeBitmap Error: %@", - err); - - VerifyOrReturn(CheckValue( - "status", err ? err.code : 0, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackMandatoryAttributeOccupancySensorTypeBitmap_10() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeOccupancySensorTypeBitmapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back mandatory attribute: OccupancySensorTypeBitmap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("occupancySensorTypeBitmap", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("occupancySensorTypeBitmap", [value unsignedCharValue], 1)); - VerifyOrReturn(CheckConstraintMaxValue("occupancySensorTypeBitmap", [value unsignedCharValue], 273)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePIROccupiedToUnoccupiedDelay_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("pirOccupiedToUnoccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIROccupiedToUnoccupiedDelay_12() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id pirOccupiedToUnoccupiedDelayArgument; - pirOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributePirOccupiedToUnoccupiedDelayWithValue:pirOccupiedToUnoccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PIROccupiedToUnoccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePIROccupiedToUnoccupiedDelay_13() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirOccupiedToUnoccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PIROccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR occupied to unoccupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePIRUnoccupiedToOccupiedDelay_14() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PIRUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedDelay_15() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedDelay_16() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id pirUnoccupiedToOccupiedDelayArgument; - pirUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributePirUnoccupiedToOccupiedDelayWithValue:pirUnoccupiedToOccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PIRUnoccupiedToOccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedDelay_17() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedThreshold_29() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -40647,29 +38663,29 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + id ultrasonicUnoccupiedToOccupiedThresholdArgument; + ultrasonicUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster - readAttributePirUnoccupiedToOccupiedDelayWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PIRUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } + writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:ultrasonicUnoccupiedToOccupiedThresholdArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"UltrasonicUnoccupiedToOccupiedThreshold Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied delay", actualValue, 0U)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOptionalAttributePIRUnoccupiedToOccupiedThreshold_18() + CHIP_ERROR TestReadBackAttributeUltrasonicUnoccupiedToOccupiedThreshold_30() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -40677,9 +38693,9 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PIRUnoccupiedToOccupiedThreshold Error: %@", err); + NSLog(@"Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); @@ -40690,74 +38706,16 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributeConstrainsPIRUnoccupiedToOccupiedThreshold_19() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PIRUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; + VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1U)); } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("pirUnoccupiedToOccupiedThreshold", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1)); - VerifyOrReturn(CheckConstraintMaxValue("pirUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePIRUnoccupiedToOccupiedThreshold_20() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id pirUnoccupiedToOccupiedThresholdArgument; - pirUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1]; - [cluster writeAttributePirUnoccupiedToOccupiedThresholdWithValue:pirUnoccupiedToOccupiedThresholdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PIRUnoccupiedToOccupiedThreshold Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePIRUnoccupiedToOccupiedThreshold_21() + CHIP_ERROR TestReadsOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_31() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -40765,9 +38723,9 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributePirUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PIRUnoccupiedToOccupiedThreshold Error: %@", err); + NSLog(@"Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); @@ -40778,7 +38736,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("PIR unoccupied to occupied threshold", actualValue, 1)); + VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); } NextTest(); @@ -40787,7 +38745,7 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_22() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_32() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -40795,9 +38753,9 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); + NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { NextTest(); @@ -40806,320 +38764,14 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("ultrasonicOccupiedToUnoccupiedDelay", "", "uint16")); + VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_23() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id ultrasonicOccupiedToUnoccupiedDelayArgument; - ultrasonicOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:ultrasonicOccupiedToUnoccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"UltrasonicOccupiedToUnoccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackOptionalAttributeUltrasonicOccupiedToUnoccupiedDelay_24() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back optional attribute: UltrasonicOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic occupied to unoccupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedDelay_25() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); - } - - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedDelay_26() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id ultrasonicUnoccupiedToOccupiedDelayArgument; - ultrasonicUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:ultrasonicUnoccupiedToOccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"UltrasonicUnoccupiedToOccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackAttributeUltrasonicUnoccupiedToOccupiedDelay_27() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back attribute: UltrasonicUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadAttributeUltrasonicUnoccupiedToOccupiedThreshold_28() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1)); - } - - VerifyOrReturn(CheckConstraintType("ultrasonicUnoccupiedToOccupiedThreshold", "", "uint16")); - VerifyOrReturn( - CheckConstraintMinValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1)); - VerifyOrReturn( - CheckConstraintMaxValue("ultrasonicUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributeUltrasonicUnoccupiedToOccupiedThreshold_29() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id ultrasonicUnoccupiedToOccupiedThresholdArgument; - ultrasonicUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1]; - [cluster - writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:ultrasonicUnoccupiedToOccupiedThresholdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"UltrasonicUnoccupiedToOccupiedThreshold Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadBackAttributeUltrasonicUnoccupiedToOccupiedThreshold_30() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read back attribute: UltrasonicUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ultrasonic unoccupied to occupied threshold", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_31() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactOccupiedToUnoccupiedDelay_32() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("physicalContactOccupiedToUnoccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_33() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_33() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device @@ -41131,2052 +38783,46 @@ class Test_TC_OCC_2_1 : public TestCommandBridge { physicalContactOccupiedToUnoccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; [cluster writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:physicalContactOccupiedToUnoccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PhysicalContactOccupiedToUnoccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_34() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_35() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_36() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_37() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id physicalContactUnoccupiedToOccupiedDelayArgument; - physicalContactUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; - [cluster - writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:physicalContactUnoccupiedToOccupiedDelayArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"Writes the respective default value to optional attribute: " - @"PhysicalContactUnoccupiedToOccupiedDelay Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_38() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_39() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_40() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "", "uint8")); - VerifyOrReturn( - CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1)); - VerifyOrReturn( - CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_41() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id physicalContactUnoccupiedToOccupiedThresholdArgument; - physicalContactUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1]; - [cluster - writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:physicalContactUnoccupiedToOccupiedThresholdArgument - completionHandler:^(NSError * _Nullable err) { - NSLog( - @"Writes the respective default value to optional attribute: " - @"PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", - err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_42() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( - NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_1_1() - : TestCommandBridge("Test_TC_OO_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_OO_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_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: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : 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_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("OO_LT")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); - break; - case 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 optional global attribute: FeatureMap\n"); - if (ShouldSkip("OO_LT")) { - NextTest(); - return; - } - err = TestReadTheOptionalGlobalAttributeFeatureMap_6(); - 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; - } - - // 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 = 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 TestReadTheGlobalAttributeClusterRevision_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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, 4U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 16384UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 16385UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 16386UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 16387UL)); - } - - VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 TestReadTheGlobalAttributeAcceptedCommandList_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(6))); - VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); - VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); - VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); - VerifyOrReturn(CheckValue("", actualValue[3], 64UL)); - VerifyOrReturn(CheckValue("", actualValue[4], 65UL)); - VerifyOrReturn(CheckValue("", actualValue[5], 66UL)); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_2_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_2_1() - : TestCommandBridge("Test_TC_OO_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_OO_2_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_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 : read the mandatory attribute: OnOff\n"); - err = TestReadTheMandatoryAttributeOnOff_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read LT attribute: GlobalSceneControl\n"); - err = TestReadLtAttributeGlobalSceneControl_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read LT attribute: OnTime\n"); - err = TestReadLtAttributeOnTime_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: OffWaitTime\n"); - err = TestReadLtAttributeOffWaitTime_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: StartUpOnOff\n"); - err = TestReadLtAttributeStartUpOnOff_5(); - 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; - } - - // 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 = 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 TestReadTheMandatoryAttributeOnOff_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: OnOff Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("onOff", "", "bool")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadLtAttributeGlobalSceneControl_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: GlobalSceneControl Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("globalSceneControl", "", "bool")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadLtAttributeOnTime_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: OnTime Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("onTime", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadLtAttributeOffWaitTime_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: OffWaitTime Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("offWaitTime", "", "uint16")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadLtAttributeStartUpOnOff_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read LT attribute: StartUpOnOff Error: %@", err); - - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("startUpOnOff", "", "enum8")); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_OO_2_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_2_2() - : TestCommandBridge("Test_TC_OO_2_2") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_OO_2_2() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_2\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_2\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Send Off Command\n"); - err = TestSendOffCommand_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Send On Command\n"); - err = TestSendOnCommand_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); - err = TestSendOnCommand_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is true after on command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Send Off Command\n"); - err = TestSendOffCommand_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Send Off Command\n"); - err = TestSendOffCommand_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Send Toggle Command\n"); - err = TestSendToggleCommand_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Check on/off attribute value is true after toggle command\n"); - err = TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Send Toggle Command\n"); - err = TestSendToggleCommand_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); - err = TestWait1000ms_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after toggle command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : User prompt Set OnOff attribute manually to on\n"); - err = TestUserPromptSetOnOffAttributeManuallyToOn_17(); - 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")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : User prompt Set OnOff attribute manually to off\n"); - err = TestUserPromptSetOnOffAttributeManuallyToOff_19(); - 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")) { - NextTest(); - return; - } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reset Off Command\n"); - err = TestResetOffCommand_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); - 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; - } - - // 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 = 23; - - 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 TestSendOffCommand_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Off Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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; - } - - CHIP_ERROR TestSendOnCommand_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [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 TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendOnCommand_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [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 TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendOffCommand_7() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Off Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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; - } - - CHIP_ERROR TestSendOffCommand_9() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Off Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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; - } - - CHIP_ERROR TestSendToggleCommand_11() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Toggle Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_12() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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 toggle command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestSendToggleCommand_14() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Toggle Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_15() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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 toggle command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestUserPromptSetOnOffAttributeManuallyToOn_17() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Operate on device to set OnOff attribute manually to ongarbage: not in length on purpose", 55); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestUserPromptSetOnOffAttributeManuallyToOff_19() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span( - "Operate on device to set OnOff attribute manually to offgarbage: not in length on purpose", 56); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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; - } - - CHIP_ERROR TestResetOffCommand_21() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Reset Off Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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_OO_2_3 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_OO_2_3() - : TestCommandBridge("Test_TC_OO_2_3") - , 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_OO_2_3() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_3\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_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++) { - 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 On Command\n"); - if (ShouldSkip("CR_ON")) { - NextTest(); - return; - } - err = TestSendOnCommand_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 1000ms\n"); - err = TestWait1000ms_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads GlobalSceneControl attribute from DUT\n"); - if (ShouldSkip("A_GLOBALSCENECONTROL")) { - NextTest(); - return; - } - err = TestReadsGlobalSceneControlAttributeFromDut_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); - if (ShouldSkip("CR_ON")) { - NextTest(); - return; - } - err = TestSendOnCommand_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads GlobalSceneControl attribute from DUT\n"); - if (ShouldSkip("A_GLOBALSCENECONTROL")) { - NextTest(); - return; - } - err = TestReadsGlobalSceneControlAttributeFromDut_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Send On Command\n"); - if (ShouldSkip("CR_ON")) { - NextTest(); - return; - } - err = TestSendOnCommand_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); - err = TestWait1000ms_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads GlobalSceneControl attribute from DUT\n"); - if (ShouldSkip("A_GLOBALSCENECONTROL")) { - NextTest(); - return; - } - err = TestReadsGlobalSceneControlAttributeFromDut_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Send On Command\n"); - if (ShouldSkip("CR_ON")) { - NextTest(); - return; - } - err = TestSendOnCommand_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) { - NextTest(); - return; - } - err = TestSendOffCommand_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Send On Command\n"); - if (ShouldSkip("CR_ON")) { - NextTest(); - return; - } - err = TestSendOnCommand_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) { - NextTest(); - return; - } - err = TestSendOffCommand_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_29(); - break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Send On Command\n"); - if (ShouldSkip("CR_ON")) { - NextTest(); - return; - } - err = TestSendOnCommand_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_34(); - break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) { - NextTest(); - return; - } - err = TestSendOffCommand_37(); - break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_38(); - break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_39(); - break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_40(); - break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_41(); - break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_42(); - break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Reads OnOff attribute from DUT\n"); - if (ShouldSkip("A_ONOFF")) { - NextTest(); - return; - } - err = TestReadsOnOffAttributeFromDut_43(); - break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Reads OnTime attribute from DUT\n"); - if (ShouldSkip("A_ONTIME")) { - NextTest(); - return; - } - err = TestReadsOnTimeAttributeFromDut_44(); - break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Reads OffWaitTime attribute from DUT\n"); - if (ShouldSkip("A_OFFWAITTIME")) { - NextTest(); - return; - } - err = TestReadsOffWaitTimeAttributeFromDut_45(); - break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : Send Off Command\n"); - if (ShouldSkip("CR_OFF")) { - NextTest(); - return; - } - err = TestSendOffCommand_46(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - 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 = 47; - - 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 TestSendOnCommand_1() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"PhysicalContactOccupiedToUnoccupiedDelay Error: %@", + err); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send On Command Error: %@", err); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - 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_2() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsOnOffAttributeFromDut_3() + CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactOccupiedToUnoccupiedDelay_34() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: PhysicalContactOccupiedToUnoccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("physical contact occupied to unoccupied delay", actualValue, 0U)); } NextTest(); @@ -43185,20 +38831,28 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_4() + CHIP_ERROR TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_35() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads GlobalSceneControl attribute from DUT Error: %@", err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GlobalSceneControl", actualValue, 1)); + VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); } NextTest(); @@ -43207,44 +38861,84 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOnCommand_5() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedDelay_36() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send On Command Error: %@", err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedDelay", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_37() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id physicalContactUnoccupiedToOccupiedDelayArgument; + physicalContactUnoccupiedToOccupiedDelayArgument = [NSNumber numberWithUnsignedShort:0U]; + [cluster + writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:physicalContactUnoccupiedToOccupiedDelayArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Writes the respective default value to optional attribute: " + @"PhysicalContactUnoccupiedToOccupiedDelay Error: %@", + err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_7() + CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedDelay_38() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedDelay Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("physical contact unoccupied to occupied delay", actualValue, 0U)); } NextTest(); @@ -43253,20 +38947,28 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_8() + CHIP_ERROR TestReadsOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_39() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads GlobalSceneControl attribute from DUT Error: %@", err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GlobalSceneControl", actualValue, 1)); + VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1U)); } NextTest(); @@ -43275,66 +38977,90 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOnCommand_9() + CHIP_ERROR TestReadsOptionalAttributeConstrainsPhysicalContactUnoccupiedToOccupiedThreshold_40() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send On Command Error: %@", err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads optional attribute constrains: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("physicalContactUnoccupiedToOccupiedThreshold", "", "uint8")); + VerifyOrReturn( + CheckConstraintMinValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 1U)); + VerifyOrReturn( + CheckConstraintMaxValue("physicalContactUnoccupiedToOccupiedThreshold", [value unsignedCharValue], 254U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_10() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadsOnOffAttributeFromDut_11() + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_41() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + id physicalContactUnoccupiedToOccupiedThresholdArgument; + physicalContactUnoccupiedToOccupiedThresholdArgument = [NSNumber numberWithUnsignedChar:1U]; + [cluster + writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:physicalContactUnoccupiedToOccupiedThresholdArgument + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"Writes the respective default value to optional attribute: " + @"PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsGlobalSceneControlAttributeFromDut_12() + CHIP_ERROR TestReadsBackOptionalAttributePhysicalContactUnoccupiedToOccupiedThreshold_42() { CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + CHIPTestOccupancySensing * cluster = [[CHIPTestOccupancySensing alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads GlobalSceneControl attribute from DUT Error: %@", err); + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletionHandler:^( + NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Reads back optional attribute: PhysicalContactUnoccupiedToOccupiedThreshold Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("GlobalSceneControl", actualValue, 1)); + VerifyOrReturn(CheckValue("physical contact unoccupied to occupied threshold", actualValue, 1U)); } NextTest(); @@ -43342,253 +39068,511 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestReadsOnTimeAttributeFromDut_13() +class Test_TC_OO_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OO_1_1() + : TestCommandBridge("Test_TC_OO_1_1") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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 readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT Error: %@", err); + ~Test_TC_OO_1_1() {} - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnTime", actualValue, 0U)); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_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: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAttributeList_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : 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_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + if (ShouldSkip("OO_LT")) { + NextTest(); + return; + } + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; + case 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 optional global attribute: FeatureMap\n"); + if (ShouldSkip("OO_LT")) { + NextTest(); + return; } + err = TestReadTheOptionalGlobalAttributeFeatureMap_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 + { + 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; + } + + // 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 = 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 TestReadsOffWaitTimeAttributeFromDut_14() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OffWaitTime attribute from DUT 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("OffWaitTime", actualValue, 0U)); + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOnCommand_15() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send On 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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(5))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 16384UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 16385UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 16386UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 16387UL)); + } + + VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_16() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 TestReadTheGlobalAttributeAcceptedCommandList_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT 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("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(6))); + VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); + VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); + VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 64UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 66UL)); } + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_17() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT 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("OnTime", actualValue, 0U)); + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); } + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_18() + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OffWaitTime attribute from DUT Error: %@", err); + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the optional global attribute: FeatureMap Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OffWaitTime", actualValue, 0U)); + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 1UL)); } + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestSendOffCommand_19() +class Test_TC_OO_2_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OO_2_1() + : TestCommandBridge("Test_TC_OO_2_1") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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 offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Off Command Error: %@", err); + ~Test_TC_OO_2_1() {} - 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: Test_TC_OO_2_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_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 : read the mandatory attribute: OnOff\n"); + err = TestReadTheMandatoryAttributeOnOff_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : read LT attribute: GlobalSceneControl\n"); + err = TestReadLtAttributeGlobalSceneControl_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : read LT attribute: OnTime\n"); + err = TestReadLtAttributeOnTime_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : read LT attribute: OffWaitTime\n"); + err = TestReadLtAttributeOffWaitTime_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : read LT attribute: StartUpOnOff\n"); + err = TestReadLtAttributeStartUpOnOff_5(); + 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; + } + + // 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 = 6; + + 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 TestReadsOnOffAttributeFromDut_20() + CHIP_ERROR TestReadTheMandatoryAttributeOnOff_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + NSLog(@"read the mandatory attribute: OnOff Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - + VerifyOrReturn(CheckConstraintType("onOff", "", "bool")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_21() + CHIP_ERROR TestReadLtAttributeGlobalSceneControl_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeGlobalSceneControlWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read LT attribute: GlobalSceneControl Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnTime", actualValue, 0U)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("globalSceneControl", "", "bool")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_22() + CHIP_ERROR TestReadLtAttributeOnTime_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read LT attribute: OnTime Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("onTime", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_23() + CHIP_ERROR TestReadLtAttributeOffWaitTime_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read LT attribute: OffWaitTime Error: %@", err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnTime", actualValue, 0U)); + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("offWaitTime", "", "uint16")); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_24() + CHIP_ERROR TestReadLtAttributeStartUpOnOff_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OffWaitTime attribute from DUT Error: %@", err); + [cluster readAttributeStartUpOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read LT attribute: StartUpOnOff Error: %@", err); + + if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { + NextTest(); + return; + } VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OffWaitTime", actualValue, 0U)); + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("startUpOnOff", "", "enum8")); } NextTest(); @@ -43596,69 +39580,254 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestSendOnCommand_25() +class Test_TC_OO_2_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_OO_2_2() + : TestCommandBridge("Test_TC_OO_2_2") + , mTestIndex(0) { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send On 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) + + ~Test_TC_OO_2_2() {} - CHIP_ERROR TestReadsOnTimeAttributeFromDut_26() + /////////// TestCommand Interface ///////// + void NextTest() override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR err = CHIP_NO_ERROR; - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT Error: %@", err); + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_2\n"); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnTime", actualValue, 0U)); - } + 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 : Send Off Command\n"); + err = TestSendOffCommand_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Send On Command\n"); + err = TestSendOnCommand_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Send On Command\n"); + err = TestSendOnCommand_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Check on/off attribute value is true after on command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Send Off Command\n"); + err = TestSendOffCommand_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Send Off Command\n"); + err = TestSendOffCommand_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Send Toggle Command\n"); + err = TestSendToggleCommand_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); + err = TestWait1000ms_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Check on/off attribute value is true after toggle command\n"); + err = TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Send Toggle Command\n"); + err = TestSendToggleCommand_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); + err = TestWait1000ms_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Check on/off attribute value is false after toggle command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : User prompt Set OnOff attribute manually to on\n"); + err = TestUserPromptSetOnOffAttributeManuallyToOn_17(); + 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")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : User prompt Set OnOff attribute manually to off\n"); + err = TestUserPromptSetOnOffAttributeManuallyToOff_19(); + 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")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Reset Off Command\n"); + err = TestResetOffCommand_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); + break; + } - return CHIP_NO_ERROR; + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_27() + void OnStatusUpdate(const chip::app::StatusIB & status) override { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff 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; + 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; + } - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OffWaitTime attribute from DUT 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)); + } - { - id actualValue = value; - VerifyOrReturn(CheckValue("OffWaitTime", actualValue, 0U)); - } +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 23; - 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 TestSendOffCommand_28() + CHIP_ERROR TestSendOffCommand_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -43675,14 +39844,14 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_29() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43697,64 +39866,37 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_30() + CHIP_ERROR TestSendOnCommand_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT 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("OnTime", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_31() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_4() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadsOnTimeAttributeFromDut_32() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT Error: %@", err); + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnTime", actualValue, 0U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -43763,7 +39905,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOnCommand_33() + CHIP_ERROR TestSendOnCommand_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -43780,14 +39922,14 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_34() + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43802,42 +39944,37 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_35() + CHIP_ERROR TestSendOffCommand_7() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT 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(CheckValue("OnTime", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_36() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_8() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OffWaitTime attribute from DUT 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(CheckValue("OffWaitTime", actualValue, 0U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -43846,7 +39983,7 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOffCommand_37() + CHIP_ERROR TestSendOffCommand_9() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -43863,14 +40000,14 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_38() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_10() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43885,42 +40022,44 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_39() + CHIP_ERROR TestSendToggleCommand_11() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT Error: %@", err); + [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Send Toggle Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnTime", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_40() + CHIP_ERROR TestWait1000ms_12() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterToggleCommand_13() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + NSLog(@"Check on/off attribute value is true after toggle command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -43929,42 +40068,44 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_41() + CHIP_ERROR TestSendToggleCommand_14() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT Error: %@", err); + [cluster toggleWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Send Toggle Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnTime", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_42() + CHIP_ERROR TestWait1000ms_15() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 1000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterToggleCommand_16() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OffWaitTime attribute from DUT Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after toggle command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OffWaitTime", actualValue, 0U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -43973,20 +40114,28 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnOffAttributeFromDut_43() + CHIP_ERROR TestUserPromptSetOnOffAttributeManuallyToOn_17() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Operate on device to set OnOff attribute manually to ongarbage: not in length on purpose", 55); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_18() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnOff attribute from DUT Error: %@", err); + NSLog(@"Check on/off attribute value is true after on command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); } NextTest(); @@ -43995,20 +40144,28 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOnTimeAttributeFromDut_44() + CHIP_ERROR TestUserPromptSetOnOffAttributeManuallyToOff_19() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span( + "Operate on device to set OnOff attribute manually to offgarbage: not in length on purpose", 56); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OnTime attribute from DUT 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(CheckValue("OnTime", actualValue, 0U)); + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); } NextTest(); @@ -44017,39 +40174,39 @@ class Test_TC_OO_2_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadsOffWaitTimeAttributeFromDut_45() + CHIP_ERROR TestResetOffCommand_21() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOffWaitTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads OffWaitTime attribute from DUT Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Reset Off Command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OffWaitTime", actualValue, 0U)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestSendOffCommand_46() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { CHIPDevice * device = GetDevice("alpha"); CHIPTestOnOff * cluster = [[CHIPTestOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Send Off 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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } + NextTest(); }]; @@ -44339,7 +40496,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:0]; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"TH writes a value of 0 to StartUpOnOff attribute of DUT Error: %@", err); @@ -44366,7 +40523,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("StartUpOnOff", actualValue)); - VerifyOrReturn(CheckValue("StartUpOnOff", actualValue, 0)); + VerifyOrReturn(CheckValue("StartUpOnOff", actualValue, 0U)); } NextTest(); @@ -44417,7 +40574,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1]; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"TH writes a value of 1 to StartUpOnOff attribute of DUT Error: %@", err); @@ -44472,7 +40629,7 @@ class Test_TC_OO_2_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:2]; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"TH writes a value of 2 to StartUpOnOff attribute of DUT Error: %@", err); @@ -45359,8 +41516,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("status", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3)); + VerifyOrReturn(CheckConstraintMinValue("status", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("status", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -45454,8 +41611,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("wiredCurrentType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("wiredCurrentType", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("wiredCurrentType", [value unsignedCharValue], 1)); + VerifyOrReturn(CheckConstraintMinValue("wiredCurrentType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("wiredCurrentType", [value unsignedCharValue], 1U)); NextTest(); }]; @@ -45619,8 +41776,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("batteryChargeLevel", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("batteryChargeLevel", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("batteryChargeLevel", [value unsignedCharValue], 2)); + VerifyOrReturn(CheckConstraintMinValue("batteryChargeLevel", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batteryChargeLevel", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -45658,8 +41815,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("batteryReplaceability", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("batteryReplaceability", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("batteryReplaceability", [value unsignedCharValue], 3)); + VerifyOrReturn(CheckConstraintMinValue("batteryReplaceability", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batteryReplaceability", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -45851,8 +42008,8 @@ class Test_TC_PS_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("batteryChargeState", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("batteryChargeState", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("batteryChargeState", [value unsignedCharValue], 3)); + VerifyOrReturn(CheckConstraintMinValue("batteryChargeState", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("batteryChargeState", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -47607,8 +43764,8 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("effectiveOperationMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("effectiveOperationMode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("effectiveOperationMode", [value unsignedCharValue], 3)); + VerifyOrReturn(CheckConstraintMinValue("effectiveOperationMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("effectiveOperationMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -47630,8 +43787,8 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("effectiveControlMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("effectiveControlMode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("effectiveControlMode", [value unsignedCharValue], 7)); + VerifyOrReturn(CheckConstraintMinValue("effectiveControlMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("effectiveControlMode", [value unsignedCharValue], 7U)); NextTest(); }]; @@ -47803,8 +43960,8 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("operationMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("operationMode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("operationMode", [value unsignedCharValue], 3)); + VerifyOrReturn(CheckConstraintMinValue("operationMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("operationMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -47831,8 +43988,8 @@ class Test_TC_PCC_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("controlMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("controlMode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("controlMode", [value unsignedCharValue], 7)); + VerifyOrReturn(CheckConstraintMinValue("controlMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("controlMode", [value unsignedCharValue], 7U)); NextTest(); }]; @@ -47999,7 +44156,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:1]; + operationModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 1 to the OperationMode attribute to DUT: OperationMode Error: %@", err); @@ -48027,7 +44184,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 1U)); } NextTest(); @@ -48045,7 +44202,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:2]; + operationModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 2 to the OperationMode attribute to DUT: OperationMode Error: %@", err); @@ -48073,7 +44230,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 2)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 2U)); } NextTest(); @@ -48091,7 +44248,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:3]; + operationModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 3 to the OperationMode attribute to DUT: OperationMode Error: %@", err); @@ -48119,7 +44276,7 @@ class Test_TC_PCC_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 3)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 3U)); } NextTest(); @@ -48375,7 +44532,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id operationModeArgument; - operationModeArgument = [NSNumber numberWithUnsignedChar:0]; + operationModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOperationModeWithValue:operationModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 0 to the OperationMode attribute to DUT Error: %@", err); @@ -48403,7 +44560,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0)); + VerifyOrReturn(CheckValue("EffectiveOperationMode", actualValue, 0U)); } NextTest(); @@ -48421,7 +44578,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:0]; + controlModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeControlModeWithValue:controlModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 0 to the ControlMode attribute to DUT Error: %@", err); @@ -48449,7 +44606,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 0)); + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 0U)); } NextTest(); @@ -48467,7 +44624,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:1]; + controlModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeControlModeWithValue:controlModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 1 to the ControlMode attribute to DUT Error: %@", err); @@ -48495,7 +44652,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 1)); + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 1U)); } NextTest(); @@ -48513,7 +44670,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:2]; + controlModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeControlModeWithValue:controlModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 2 to the ControlMode attribute to DUT Error: %@", err); @@ -48541,7 +44698,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 2)); + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 2U)); } NextTest(); @@ -48559,7 +44716,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:3]; + controlModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeControlModeWithValue:controlModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 3 to the ControlMode attribute to DUT Error: %@", err); @@ -48587,7 +44744,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 3)); + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 3U)); } NextTest(); @@ -48605,7 +44762,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:5]; + controlModeArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeControlModeWithValue:controlModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 5 to the ControlMode attribute to DUT Error: %@", err); @@ -48633,7 +44790,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 5)); + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 5U)); } NextTest(); @@ -48651,7 +44808,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlModeArgument; - controlModeArgument = [NSNumber numberWithUnsignedChar:7]; + controlModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeControlModeWithValue:controlModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write 7 to the ControlMode attribute to DUT Error: %@", err); @@ -48679,7 +44836,7 @@ class Test_TC_PCC_2_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 7)); + VerifyOrReturn(CheckValue("EffectiveControlMode", actualValue, 7U)); } NextTest(); @@ -49187,10 +45344,6 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestThReadsTheFeatureMapAttributeFromTheDut_2(); break; case 3: @@ -49296,6 +45449,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); } + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); }]; @@ -49304,11 +45458,27 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { CHIP_ERROR TestThReadsTheFeatureMapAttributeFromTheDut_2() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestPowerSourceConfiguration * cluster = [[CHIPTestPowerSourceConfiguration alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the FeatureMap attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } + + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestThReadsTheAttributeListAttributeFromTheDut_3() @@ -49441,14 +45611,8 @@ class Test_TC_RH_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Read ClusterRevision attribute from the DUT and Verify that the DUT response indicates " - "ClusterRevision attribute has the value 3\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadClusterRevisionAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesClusterRevisionAttributeHasTheValue3_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: AttributeList\n"); @@ -49477,13 +45641,8 @@ class Test_TC_RH_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; case 6: - ChipLogProgress( - chipTool, " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT response\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Read FeatureMap attribute from the DUT and Verify that the DUT\n"); + err = TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDut_6(); break; } @@ -49544,14 +45703,29 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR - TestReadClusterRevisionAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesClusterRevisionAttributeHasTheValue3_1() + CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter the Valuegarbage: not in length on purpose", 15); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("3garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 3U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() @@ -49604,11 +45778,6 @@ class Test_TC_RH_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")); NextTest(); }]; @@ -49629,11 +45798,6 @@ class Test_TC_RH_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); NextTest(); }]; @@ -49641,13 +45805,29 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDutResponse_6() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDutAndVerifyThatTheDut_6() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter FeatureMap attribute valuegarbage: not in length on purpose", 39); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("0garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestRelativeHumidityMeasurement * cluster = [[CHIPTestRelativeHumidityMeasurement 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 and Verify that the DUT 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; } }; @@ -49990,11 +46170,11 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("number of positions", actualValue, 2)); + VerifyOrReturn(CheckValue("number of positions", actualValue, 2U)); } VerifyOrReturn(CheckConstraintType("numberOfPositions", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("numberOfPositions", [value unsignedCharValue], 2)); + VerifyOrReturn(CheckConstraintMinValue("numberOfPositions", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -50015,11 +46195,11 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("current position", actualValue, 0)); + VerifyOrReturn(CheckValue("current position", actualValue, 0U)); } VerifyOrReturn(CheckConstraintType("currentPosition", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentPosition", [value unsignedCharValue], 0)); + VerifyOrReturn(CheckConstraintMinValue("currentPosition", [value unsignedCharValue], 0U)); NextTest(); }]; @@ -50040,11 +46220,11 @@ class Test_TC_SWTCH_2_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("multi press max", actualValue, 2)); + VerifyOrReturn(CheckValue("multi press max", actualValue, 2U)); } VerifyOrReturn(CheckConstraintType("multiPressMax", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("multiPressMax", [value unsignedCharValue], 2)); + VerifyOrReturn(CheckConstraintMinValue("multiPressMax", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -50096,52 +46276,38 @@ class Test_TC_TM_1_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, - " ***** Test Step 1 : Read ClusterRevision attribute from the DUT and Verify that the DUT response indicates " - "ClusterRevision attribute has the value 4\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadClusterRevisionAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesClusterRevisionAttributeHasTheValue4_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: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { - NextTest(); - return; - } - err = TestReadTheGlobalAttributeAttributeList_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 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 3 : Read the global attribute: AttributeList\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && A_TEMPERATURE_TOLERANCE")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: ChipLogProgress(chipTool, - " ***** Test Step 4 : Read AcceptedCommandList attribute from the DUT and Verify that the DUT response provides a " - "list of supported commands,This list SHALL include all the mandatory commands.\n"); + " ***** Test Step 4 : 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 = TestReadAcceptedCommandListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedCommandsThisListShallIncludeAllTheMandatoryCommands_4(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4(); break; case 5: - ChipLogProgress(chipTool, - " ***** Test Step 5 : Read GeneratedCommandList attribute from the DUT and Verify that the DUT response provides a " - "list of supported commands.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadGeneratedCommandListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedCommands_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 GeneratedCommandList attribute from the DUT\n"); + err = TestReadGeneratedCommandListAttributeFromTheDut_6(); break; } @@ -50172,6 +46338,9 @@ class Test_TC_TM_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -50185,7 +46354,7 @@ class Test_TC_TM_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -50199,17 +46368,57 @@ class Test_TC_TM_1_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR - TestReadClusterRevisionAttributeFromTheDutAndVerifyThatTheDutResponseIndicatesClusterRevisionAttributeHasTheValue4_1() + CHIP_ERROR TestReadClusterRevisionAttributeFromTheDut_1() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter ClusterRevision attribute valuegarbage: not in length on purpose", 44); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("4garbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 4U)); + } + + VerifyOrReturn(CheckConstraintType("clusterRevision", "", "unit16")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement 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); + + 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() { CHIPDevice * device = GetDevice("alpha"); CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement alloc] initWithDevice:device @@ -50224,11 +46433,17 @@ class Test_TC_TM_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(4))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65530UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -50238,7 +46453,7 @@ class Test_TC_TM_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -50247,23 +46462,49 @@ class Test_TC_TM_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR - TestReadAcceptedCommandListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedCommandsThisListShallIncludeAllTheMandatoryCommands_4() + CHIP_ERROR TestReadAcceptedCommandListAttributeFromTheDut_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); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedCommands_5() + CHIP_ERROR TestReadGeneratedCommandListAttributeFromTheDut_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); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestTemperatureMeasurement * cluster = [[CHIPTestTemperatureMeasurement 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); + } + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -50526,12 +46767,13 @@ 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"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Read the optional global attribute constraints: FeatureMap\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + if (ShouldSkip( + "PICS_SKIP_SAMPLE_APP && (TSTAT_HEAT || TSTAT_COOL || TSTAT_OCC || TSTAT_SCH || TSTAT_SB || TSTAT_AUTO)")) { NextTest(); return; } @@ -50555,18 +46797,10 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { break; case 5: ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: AcceptedCommandList\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeAcceptedCommandList_5(); break; case 6: ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; } @@ -50635,7 +46869,7 @@ class Test_TC_TSTAT_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)); @@ -50716,20 +46950,38 @@ class Test_TC_TSTAT_1_1 : public TestCommandBridge { CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_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); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestThermostat * cluster = [[CHIPTestThermostat 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); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_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); + CHIPDevice * device = GetDevice("alpha"); + CHIPTestThermostat * cluster = [[CHIPTestThermostat 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")); + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; @@ -51685,8 +47937,8 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5)); + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); NextTest(); }]; @@ -51706,8 +47958,8 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("systemMode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("systemMode", [value unsignedCharValue], 9)); + VerifyOrReturn(CheckConstraintMinValue("systemMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("systemMode", [value unsignedCharValue], 9U)); NextTest(); }]; @@ -51825,8 +48077,8 @@ class Test_TC_TSTAT_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("startOfWeek", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", [value unsignedCharValue], 6)); + VerifyOrReturn(CheckConstraintMinValue("startOfWeek", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", [value unsignedCharValue], 6U)); NextTest(); }]; @@ -54650,12 +50902,12 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 4)); + VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 4U)); } VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5)); + VerifyOrReturn(CheckConstraintMinValue("controlSequenceOfOperation", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", [value unsignedCharValue], 5U)); NextTest(); }]; @@ -54670,7 +50922,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id controlSequenceOfOperationArgument; - controlSequenceOfOperationArgument = [NSNumber numberWithUnsignedChar:2]; + controlSequenceOfOperationArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeControlSequenceOfOperationWithValue:controlSequenceOfOperationArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write Attribute command for ControlSequenceOfOperation with a new " @@ -54699,7 +50951,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 2)); + VerifyOrReturn(CheckValue("ControlSequenceOfOperation", actualValue, 2U)); } NextTest(); @@ -54715,7 +50967,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:0]; + params.mode = [NSNumber numberWithUnsignedChar:0U]; params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -54763,7 +51015,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:0]; + params.mode = [NSNumber numberWithUnsignedChar:0U]; params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -54836,7 +51088,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:1]; + params.mode = [NSNumber numberWithUnsignedChar:1U]; params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -54909,7 +51161,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:1]; + params.mode = [NSNumber numberWithUnsignedChar:1U]; params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -54982,7 +51234,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:2]; + params.mode = [NSNumber numberWithUnsignedChar:2U]; params.amount = [NSNumber numberWithChar:-30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -55082,7 +51334,7 @@ class Test_TC_TSTAT_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.mode = [NSNumber numberWithUnsignedChar:2]; + params.mode = [NSNumber numberWithUnsignedChar:2U]; params.amount = [NSNumber numberWithChar:30]; [cluster setpointRaiseLowerWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -55198,30 +51450,34 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { err = TestThReadClusterRevisionAttributeFromTheDut_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: AttributeList\n"); - if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + 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"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP && A_TEMPERATURE_TOLERANCE")) { NextTest(); return; } - err = TestReadTheGlobalAttributeAttributeList_2(); + err = TestReadTheGlobalAttributeAttributeList_3(); break; - case 3: + case 4: ChipLogProgress(chipTool, - " ***** Test Step 3 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " + " ***** Test Step 4 : 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_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_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 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; } @@ -55252,6 +51508,9 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -55265,7 +51524,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -55303,7 +51562,31 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_2() + CHIP_ERROR TestReadFeatureMapAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestThermostatUserInterfaceConfiguration * cluster = + [[CHIPTestThermostatUserInterfaceConfiguration 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); + + 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() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -55317,10 +51600,17 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(3))); + VerifyOrReturn(CheckValue("AttributeList", [actualValue count], static_cast(10))); VerifyOrReturn(CheckValue("", actualValue[0], 0UL)); VerifyOrReturn(CheckValue("", actualValue[1], 1UL)); VerifyOrReturn(CheckValue("", actualValue[2], 2UL)); + VerifyOrReturn(CheckValue("", actualValue[3], 3UL)); + VerifyOrReturn(CheckValue("", actualValue[4], 65528UL)); + VerifyOrReturn(CheckValue("", actualValue[5], 65529UL)); + VerifyOrReturn(CheckValue("", actualValue[6], 65530UL)); + VerifyOrReturn(CheckValue("", actualValue[7], 65531UL)); + VerifyOrReturn(CheckValue("", actualValue[8], 65532UL)); + VerifyOrReturn(CheckValue("", actualValue[9], 65533UL)); } VerifyOrReturn(CheckConstraintType("attributeList", "", "list")); @@ -55330,7 +51620,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_3() + CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_4() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); @@ -55339,7 +51629,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return UserPrompt("alpha", value); } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_5() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -55363,7 +51653,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_6() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -55431,28 +51721,16 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : read the mandatory attribute: TemperatureDisplayMode\n"); + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the mandatory attribute: TemperatureDisplayMode\n"); err = TestReadTheMandatoryAttributeTemperatureDisplayMode_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : read the mandatory attribute: TemperatureDisplayMode\n"); - err = TestReadTheMandatoryAttributeTemperatureDisplayMode_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the mandatory attribute: KeypadLockout\n"); + err = TestReadTheMandatoryAttributeKeypadLockout_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : read the mandatory attribute: KeypadLockout\n"); - err = TestReadTheMandatoryAttributeKeypadLockout_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : read the optional attribute: ScheduleProgrammingVisibility\n"); - err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_6(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the optional attribute: ScheduleProgrammingVisibility\n"); + err = TestReadTheOptionalAttributeScheduleProgrammingVisibility_3(); break; } @@ -55477,15 +51755,6 @@ class Test_TC_TSUIC_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; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -55499,7 +51768,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 4; chip::Optional mNodeId; chip::Optional mCluster; @@ -55521,59 +51790,13 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("temperature display mode", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeTemperatureDisplayMode_2() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeTemperatureDisplayModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: TemperatureDisplayMode Error: %@", err); + NSLog(@"Read the mandatory attribute: TemperatureDisplayMode Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("temperatureDisplayMode", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", [value unsignedCharValue], 1)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_3() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("keypad lockout", actualValue, 0)); - } + VerifyOrReturn(CheckConstraintMinValue("temperatureDisplayMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("temperatureDisplayMode", [value unsignedCharValue], 1U)); NextTest(); }]; @@ -55581,7 +51804,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_4() + CHIP_ERROR TestReadTheMandatoryAttributeKeypadLockout_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -55589,13 +51812,13 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeKeypadLockoutWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the mandatory attribute: KeypadLockout Error: %@", err); + NSLog(@"Read the mandatory attribute: KeypadLockout Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("keypadLockout", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("keypadLockout", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", [value unsignedCharValue], 5)); + VerifyOrReturn(CheckConstraintMinValue("keypadLockout", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("keypadLockout", [value unsignedCharValue], 5U)); NextTest(); }]; @@ -55603,31 +51826,7 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_5() - { - CHIPDevice * device = GetDevice("alpha"); - CHIPTestThermostatUserInterfaceConfiguration * cluster = - [[CHIPTestThermostatUserInterfaceConfiguration alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("schedule programming visibility", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_6() + CHIP_ERROR TestReadTheOptionalAttributeScheduleProgrammingVisibility_3() { CHIPDevice * device = GetDevice("alpha"); CHIPTestThermostatUserInterfaceConfiguration * cluster = @@ -55636,13 +51835,13 @@ class Test_TC_TSUIC_2_1 : public TestCommandBridge { [cluster readAttributeScheduleProgrammingVisibilityWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); + NSLog(@"Read the optional attribute: ScheduleProgrammingVisibility Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("scheduleProgrammingVisibility", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1)); + VerifyOrReturn(CheckConstraintMinValue("scheduleProgrammingVisibility", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("scheduleProgrammingVisibility", [value unsignedCharValue], 1U)); NextTest(); }]; @@ -55961,7 +52160,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0]; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument completionHandler:^(NSError * _Nullable err) { @@ -55990,7 +52189,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:1]; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument completionHandler:^(NSError * _Nullable err) { @@ -56019,7 +52218,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id temperatureDisplayModeArgument; - temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2]; + temperatureDisplayModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeTemperatureDisplayModeWithValue:temperatureDisplayModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of greater than 1 to TemperatureDisplayMode attribute of " @@ -56042,7 +52241,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0]; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 0 to KeypadLockout attribute of DUT Error: %@", err); @@ -56071,7 +52270,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:1]; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 1 to KeypadLockout attribute of DUT Error: %@", err); @@ -56100,7 +52299,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:2]; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 2 to KeypadLockout attribute of DUT Error: %@", err); @@ -56129,7 +52328,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:3]; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 3 to KeypadLockout attribute of DUT Error: %@", err); @@ -56158,7 +52357,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:4]; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 4 to KeypadLockout attribute of DUT Error: %@", err); @@ -56187,7 +52386,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:5]; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 5 to KeypadLockout attribute of DUT Error: %@", err); @@ -56216,7 +52415,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id keypadLockoutArgument; - keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6]; + keypadLockoutArgument = [NSNumber numberWithUnsignedChar:6U]; [cluster writeAttributeKeypadLockoutWithValue:keypadLockoutArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of greater than 5 to KeypadLockout attribute of DUT Error: %@", err); @@ -56236,7 +52435,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0]; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 0 to ScheduleProgrammingVisibility attribute of " @@ -56267,7 +52466,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:1]; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of 1 to ScheduleProgrammingVisibility attribute of " @@ -56298,7 +52497,7 @@ class Test_TC_TSUIC_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id scheduleProgrammingVisibilityArgument; - scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2]; + scheduleProgrammingVisibilityArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeScheduleProgrammingVisibilityWithValue:scheduleProgrammingVisibilityArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Writes a value of greater than 1 to ScheduleProgrammingVisibility " @@ -56647,7 +52846,178 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() + CHIP_ERROR TestThWritesLabelListAttributeFromTheDut_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel 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] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; + + temp_0[1] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; + + temp_0[2] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; + + temp_0[3] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; + + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute from the DUT 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", ((CHIPUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); + VerifyOrReturn( + CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); + VerifyOrReturn( + CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); + VerifyOrReturn(CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); + VerifyOrReturn(CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); + VerifyOrReturn(CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); + VerifyOrReturn( + CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); + VerifyOrReturn(CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_3 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_3() + : TestCommandBridge("Test_TC_ULABEL_2_3") + , 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_ULABEL_2_3() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_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++) { + 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 : TH writes LabelList attribute of the DUT\n"); + err = TestThWritesLabelListAttributeOfTheDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute of the DUT\n"); + err = TestThReadsLabelListAttributeOfTheDut_2(); + 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_FAILURE)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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 = 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 TestThWritesLabelListAttributeOfTheDut_1() { CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -56657,75 +53027,54 @@ class Test_TC_ULABEL_2_2 : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPUserLabelClusterLabelStruct alloc] init]; - ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"roomName"; - ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"master bedroom 1"; - - temp_0[1] = [[CHIPUserLabelClusterLabelStruct alloc] init]; - ((CHIPUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; - ((CHIPUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; - - temp_0[2] = [[CHIPUserLabelClusterLabelStruct alloc] init]; - ((CHIPUserLabelClusterLabelStruct *) temp_0[2]).label = @"floor"; - ((CHIPUserLabelClusterLabelStruct *) temp_0[2]).value = @"2"; - - temp_0[3] = [[CHIPUserLabelClusterLabelStruct alloc] init]; - ((CHIPUserLabelClusterLabelStruct *) temp_0[3]).label = @"roomType"; - ((CHIPUserLabelClusterLabelStruct *) temp_0[3]).value = @"bedroom"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"17_bytesIsTooLongforuserlabelnotexpected"; labelListArgument = temp_0; } [cluster writeAttributeLabelListWithValue:labelListArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes LabelList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsLabelListAttributeFromTheDut_2() + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_2() { CHIPDevice * device = GetDevice("alpha"); CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads LabelList attribute from the DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id labelListArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"17_bytesIsTooLongforuserlabelnotexpected"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"foobar"; - { - id actualValue = value; - VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(4))); - VerifyOrReturn( - CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[0]).label, @"roomName")); - VerifyOrReturn( - CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[0]).value, @"master bedroom 1")); - VerifyOrReturn( - CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); - VerifyOrReturn(CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); - VerifyOrReturn(CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[2]).label, @"floor")); - VerifyOrReturn(CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[2]).value, @"2")); - VerifyOrReturn( - CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[3]).label, @"roomType")); - VerifyOrReturn(CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[3]).value, @"bedroom")); - } + labelListArgument = temp_0; + } + [cluster writeAttributeLabelListWithValue:labelListArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); - NextTest(); - }]; + VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; return CHIP_NO_ERROR; } }; -class Test_TC_ULABEL_2_3 : public TestCommandBridge { +class Test_TC_ULABEL_2_4 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ULABEL_2_3() - : TestCommandBridge("Test_TC_ULABEL_2_3") + Test_TC_ULABEL_2_4() + : TestCommandBridge("Test_TC_ULABEL_2_4") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -56735,7 +53084,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_ULABEL_2_3() {} + ~Test_TC_ULABEL_2_4() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -56743,11 +53092,11 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -56771,6 +53120,14 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads LabelList attribute of the DUT\n"); err = TestThReadsLabelListAttributeOfTheDut_2(); break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes LabelList attribute of the DUT\n"); + err = TestThWritesLabelListAttributeOfTheDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads LabelList attribute of the DUT\n"); + err = TestThReadsLabelListAttributeOfTheDut_4(); + break; } if (CHIP_NO_ERROR != err) { @@ -56786,10 +53143,16 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + 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; } @@ -56804,7 +53167,7 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 5; chip::Optional mNodeId; chip::Optional mCluster; @@ -56829,7 +53192,11 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPUserLabelClusterLabelStruct alloc] init]; ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"room"; - ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"17_bytesIsTooLongforuserlabelnotexpected"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"bedroom 1"; + + temp_0[1] = [[CHIPUserLabelClusterLabelStruct alloc] init]; + ((CHIPUserLabelClusterLabelStruct *) temp_0[1]).label = @"Orientation"; + ((CHIPUserLabelClusterLabelStruct *) temp_0[1]).value = @"east"; labelListArgument = temp_0; } @@ -56837,7 +53204,8 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { completionHandler:^(NSError * _Nullable err) { NSLog(@"TH writes LabelList attribute of the DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NextTest(); }]; @@ -56850,25 +53218,181 @@ class Test_TC_ULABEL_2_3 : public TestCommandBridge { CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(2))); + VerifyOrReturn(CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[0]).label, @"room")); + VerifyOrReturn( + CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[0]).value, @"bedroom 1")); + VerifyOrReturn( + CheckValueAsString("label", ((CHIPUserLabelClusterLabelStruct *) actualValue[1]).label, @"Orientation")); + VerifyOrReturn(CheckValueAsString("value", ((CHIPUserLabelClusterLabelStruct *) actualValue[1]).value, @"east")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWritesLabelListAttributeOfTheDut_3() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel 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] = [[CHIPUserLabelClusterLabelStruct alloc] init]; - ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).label = @"17_bytesIsTooLongforuserlabelnotexpected"; - ((CHIPUserLabelClusterLabelStruct *) temp_0[0]).value = @"foobar"; - labelListArgument = temp_0; } [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.code : 0, 0)); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, EMBER_ZCL_STATUS_FAILURE)); NextTest(); }]; return CHIP_NO_ERROR; } + + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_4() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("label list", [actualValue count], static_cast(0))); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_ULABEL_2_5 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_ULABEL_2_5() + : TestCommandBridge("Test_TC_ULABEL_2_5") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_ULABEL_2_5() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ULABEL_2_5\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ULABEL_2_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads LabelList attribute of the DUT\n"); + err = TestThReadsLabelListAttributeOfTheDut_1(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 2; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThReadsLabelListAttributeOfTheDut_1() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestUserLabel * cluster = [[CHIPTestUserLabel alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeLabelListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads LabelList attribute of the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("labelList", "", "list")); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_DGWIFI_2_1 : public TestCommandBridge { @@ -57133,8 +53657,8 @@ class Test_TC_DGWIFI_2_1 : public TestCommandBridge { if (value != nil) { VerifyOrReturn(CheckConstraintType("wiFiVersion", "", "enum")); - VerifyOrReturn(CheckConstraintMinValue("wiFiVersion", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("wiFiVersion", [value unsignedCharValue], 5)); + VerifyOrReturn(CheckConstraintMinValue("wiFiVersion", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("wiFiVersion", [value unsignedCharValue], 5U)); } NextTest(); @@ -58335,8 +54859,8 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("type", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9)); + VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9U)); NextTest(); }]; @@ -58356,8 +54880,8 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("configStatus", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 63)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 63U)); NextTest(); }]; @@ -58377,8 +54901,8 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 63)); + VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 63U)); NextTest(); }]; @@ -58398,8 +54922,8 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23)); + VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); NextTest(); }]; @@ -58419,8 +54943,8 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("mode", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 15)); + VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 15U)); NextTest(); }]; @@ -58435,7 +54959,7 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0]; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"1f: write a value into the RW mandatory attribute:: Mode Error: %@", err); @@ -58848,9 +55372,9 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "Percent")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -58875,9 +55399,9 @@ class Test_TC_WNCV_2_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "Percent")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -59303,7 +55827,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:1]; + modeArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeModeWithValue:modeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"1a: TH set the Mode Attribute bit0 of the DUT Error: %@", err); @@ -59327,8 +55851,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 4)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 4U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -59343,7 +55867,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0]; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"1c: TH clear the Mode Attribute bit0 of the DUT Error: %@", err); @@ -59367,8 +55891,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -59383,7 +55907,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:2]; + modeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeModeWithValue:modeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"2a: TH set the Mode Attribute bit1 of the DUT Error: %@", err); @@ -59408,8 +55932,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); { configStatusValA = value; } @@ -59443,7 +55967,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0]; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"2d: TH clear the Mode Attribute bit1 of the DUT Error: %@", err); @@ -59467,8 +55991,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -59487,8 +56011,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -59520,7 +56044,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:4]; + modeArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeModeWithValue:modeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"3a: TH set the Mode Attribute bit2 of the DUT Error: %@", err); @@ -59545,8 +56069,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); { configStatusValB = value; } @@ -59580,7 +56104,7 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id modeArgument; - modeArgument = [NSNumber numberWithUnsignedChar:0]; + modeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeModeWithValue:modeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"3d: TH clear the Mode Attribute bit2 of the DUT Error: %@", err); @@ -59604,8 +56128,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1)); - VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("configStatus", [value unsignedCharValue], 1U)); + VerifyOrReturn(CheckConstraintMaxValue("configStatus", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -59624,8 +56148,8 @@ class Test_TC_WNCV_2_3 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 127)); + VerifyOrReturn(CheckConstraintMinValue("mode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("mode", [value unsignedCharValue], 127U)); NextTest(); }]; @@ -59757,8 +56281,8 @@ class Test_TC_WNCV_2_4 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("type", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9)); + VerifyOrReturn(CheckConstraintMinValue("type", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("type", [value unsignedCharValue], 9U)); NextTest(); }]; @@ -59874,12 +56398,12 @@ class Test_TC_WNCV_2_5 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("EndProductType", actualValue, 0)); + VerifyOrReturn(CheckValue("EndProductType", actualValue, 0U)); } VerifyOrReturn(CheckConstraintType("endProductType", "", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23)); + VerifyOrReturn(CheckConstraintMinValue("endProductType", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("endProductType", [value unsignedCharValue], 23U)); NextTest(); }]; @@ -60277,9 +56801,9 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1)); + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -60331,9 +56855,9 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1)); + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -60485,8 +57009,8 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 5)); - VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 21)); + VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 5U)); + VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 21U)); NextTest(); }; @@ -60544,9 +57068,9 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99)); + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -60598,9 +57122,9 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99)); + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -60646,7 +57170,7 @@ class Test_TC_WNCV_3_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -61106,9 +57630,9 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99)); + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -61160,9 +57684,9 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99)); + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 99U)); } NextTest(); @@ -61314,8 +57838,8 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("operationalStatus", "", "map8")); - VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 10)); - VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 42)); + VerifyOrReturn(CheckConstraintMinValue("operationalStatus", [value unsignedCharValue], 10U)); + VerifyOrReturn(CheckConstraintMaxValue("operationalStatus", [value unsignedCharValue], 42U)); NextTest(); }; @@ -61373,9 +57897,9 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionLiftPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1)); + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -61427,9 +57951,9 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("currentPositionTiltPercentage", "", "uint8")); VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1)); + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 1U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -61475,7 +57999,7 @@ class Test_TC_WNCV_3_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -61897,7 +58421,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -61926,7 +58450,7 @@ class Test_TC_WNCV_3_3 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -62292,7 +58816,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -62340,7 +58864,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 0U)); } NextTest(); @@ -62388,7 +58912,7 @@ class Test_TC_WNCV_3_4 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 0U)); } NextTest(); @@ -62632,7 +59156,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -62680,7 +59204,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 100U)); } NextTest(); @@ -62728,7 +59252,7 @@ class Test_TC_WNCV_3_5 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 100)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 100U)); } NextTest(); @@ -63103,7 +59627,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -63151,7 +59675,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 25)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 25U)); } NextTest(); @@ -63231,7 +59755,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -63279,7 +59803,7 @@ class Test_TC_WNCV_4_1 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 75)); + VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, 75U)); } NextTest(); @@ -63654,7 +60178,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -63702,7 +60226,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 30)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 30U)); } NextTest(); @@ -63782,7 +60306,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0)); + VerifyOrReturn(CheckValue("OperationalStatus", actualValue, 0U)); } NextTest(); @@ -63830,7 +60354,7 @@ class Test_TC_WNCV_4_2 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); - VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 60)); + VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, 60U)); } NextTest(); @@ -64030,14 +60554,14 @@ class Test_TC_WNCV_4_3 : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionLiftPercentage", actualValue)); VerifyOrReturn(CheckValue("CurrentPositionLiftPercentage", actualValue, - [attrCurrentPositionLiftPercent100ths unsignedShortValue] / 100)); + [attrCurrentPositionLiftPercent100ths unsignedShortValue] / 100U)); } if (value != nil) { VerifyOrReturn( - CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionLiftPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionLiftPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -64294,14 +60818,14 @@ class Test_TC_WNCV_4_4 : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValueNonNull("CurrentPositionTiltPercentage", actualValue)); VerifyOrReturn(CheckValue("CurrentPositionTiltPercentage", actualValue, - [attrCurrentPositionTiltPercent100ths unsignedShortValue] / 100)); + [attrCurrentPositionTiltPercent100ths unsignedShortValue] / 100U)); } if (value != nil) { VerifyOrReturn( - CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0)); + CheckConstraintMinValue("currentPositionTiltPercentage", [value unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100)); + CheckConstraintMaxValue("currentPositionTiltPercentage", [value unsignedCharValue], 100U)); } NextTest(); @@ -64622,7 +61146,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test1bThWaitsFor100ms1s_3() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } @@ -64673,7 +61197,7 @@ class Test_TC_WNCV_4_5 : public TestCommandBridge { CHIP_ERROR Test2bThWaitsFor100ms1s_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } @@ -64943,10 +61467,10 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("TargetList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("identifier", ((CHIPTargetNavigatorClusterTargetInfo *) actualValue[0]).identifier, 1)); + VerifyOrReturn(CheckValue("identifier", ((CHIPTargetNavigatorClusterTargetInfo *) actualValue[0]).identifier, 1U)); VerifyOrReturn( CheckValueAsString("name", ((CHIPTargetNavigatorClusterTargetInfo *) actualValue[0]).name, @"exampleName")); - VerifyOrReturn(CheckValue("identifier", ((CHIPTargetNavigatorClusterTargetInfo *) actualValue[1]).identifier, 2)); + VerifyOrReturn(CheckValue("identifier", ((CHIPTargetNavigatorClusterTargetInfo *) actualValue[1]).identifier, 2U)); VerifyOrReturn( CheckValueAsString("name", ((CHIPTargetNavigatorClusterTargetInfo *) actualValue[1]).name, @"exampleName")); } @@ -64970,7 +61494,7 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentTarget", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentTarget", actualValue, 0U)); } NextTest(); @@ -64986,7 +61510,7 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTargetNavigatorClusterNavigateTargetParams alloc] init]; - params.target = [NSNumber numberWithUnsignedChar:1]; + params.target = [NSNumber numberWithUnsignedChar:1U]; params.data = @"1"; [cluster navigateTargetWithParams:params completionHandler:^( @@ -64997,7 +61521,7 @@ class TV_TargetNavigatorCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -65144,14 +61668,14 @@ class TV_AudioOutputCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("OutputList", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).index, 1)); - VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).outputType, 0)); + VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).index, 1U)); + VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).outputType, 0U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).name, @"HDMI")); - VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).index, 2)); - VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).outputType, 0)); + VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).index, 2U)); + VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).outputType, 0U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).name, @"HDMI")); - VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).index, 3)); - VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).outputType, 0)); + VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).index, 3U)); + VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).outputType, 0U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).name, @"HDMI")); } @@ -65174,7 +61698,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1)); + VerifyOrReturn(CheckValue("CurrentOutput", actualValue, 1U)); } NextTest(); @@ -65190,7 +61714,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPAudioOutputClusterSelectOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; + params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectOutputWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Select Output Command Error: %@", err); @@ -65210,7 +61734,7 @@ class TV_AudioOutputCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPAudioOutputClusterRenameOutputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; + params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"HDMI Test"; [cluster renameOutputWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -65238,15 +61762,15 @@ class TV_AudioOutputCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("OutputList", [actualValue count], static_cast(3))); - VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).index, 1)); - VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).outputType, 0)); + VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).index, 1U)); + VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).outputType, 0U)); VerifyOrReturn( CheckValueAsString("name", ((CHIPAudioOutputClusterOutputInfo *) actualValue[0]).name, @"HDMI Test")); - VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).index, 2)); - VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).outputType, 0)); + VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).index, 2U)); + VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).outputType, 0U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPAudioOutputClusterOutputInfo *) actualValue[1]).name, @"HDMI")); - VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).index, 3)); - VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).outputType, 0)); + VerifyOrReturn(CheckValue("index", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).index, 3U)); + VerifyOrReturn(CheckValue("outputType", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).outputType, 0U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPAudioOutputClusterOutputInfo *) actualValue[2]).name, @"HDMI")); } @@ -65450,7 +61974,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -65487,7 +62011,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -65524,7 +62048,7 @@ class TV_ApplicationLauncherCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -65636,7 +62160,7 @@ class TV_KeypadInputCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPKeypadInputClusterSendKeyParams alloc] init]; - params.keyCode = [NSNumber numberWithUnsignedChar:3]; + params.keyCode = [NSNumber numberWithUnsignedChar:3U]; [cluster sendKeyWithParams:params completionHandler:^(CHIPKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable err) { NSLog(@"Send Key Command Error: %@", err); @@ -65645,7 +62169,7 @@ class TV_KeypadInputCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } NextTest(); @@ -66187,7 +62711,7 @@ class TV_ApplicationBasicCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("Status", actualValue, 0)); + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); } NextTest(); @@ -66518,7 +63042,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentState", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentState", actualValue, 0U)); } NextTest(); @@ -66681,7 +63205,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66709,7 +63233,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66737,7 +63261,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66765,7 +63289,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66793,7 +63317,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66821,7 +63345,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66849,7 +63373,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66877,7 +63401,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66908,7 +63432,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -66965,7 +63489,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -67021,7 +63545,7 @@ class TV_MediaPlaybackCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -67260,7 +63784,7 @@ class TV_ChannelCluster : public TestCommandBridge { "lineupName", ((CHIPChannelClusterLineupInfo *) actualValue).lineupName, @"Comcast King County")); VerifyOrReturn( CheckValueAsString("postalCode", ((CHIPChannelClusterLineupInfo *) actualValue).postalCode, @"98052")); - VerifyOrReturn(CheckValue("lineupInfoType", ((CHIPChannelClusterLineupInfo *) actualValue).lineupInfoType, 0)); + VerifyOrReturn(CheckValue("lineupInfoType", ((CHIPChannelClusterLineupInfo *) actualValue).lineupInfoType, 0U)); } NextTest(); @@ -67316,7 +63840,7 @@ class TV_ChannelCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -67649,7 +64173,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { { NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; temp_1[0] = [[CHIPContentLauncherClusterParameter alloc] init]; - ((CHIPContentLauncherClusterParameter *) temp_1[0]).type = [NSNumber numberWithUnsignedChar:1]; + ((CHIPContentLauncherClusterParameter *) temp_1[0]).type = [NSNumber numberWithUnsignedChar:1U]; ((CHIPContentLauncherClusterParameter *) temp_1[0]).value = @"exampleValue"; { NSMutableArray * temp_4 = [[NSMutableArray alloc] init]; @@ -67674,7 +64198,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -67733,7 +64257,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { .background) .size) .metric - = [NSNumber numberWithUnsignedChar:0]; + = [NSNumber numberWithUnsignedChar:0U]; ((CHIPContentLauncherClusterBrandingInformation *) params.brandingInformation).logo = [[CHIPContentLauncherClusterStyleInformation alloc] init]; @@ -67769,7 +64293,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { .logo) .size) .metric - = [NSNumber numberWithUnsignedChar:0]; + = [NSNumber numberWithUnsignedChar:0U]; ((CHIPContentLauncherClusterBrandingInformation *) params.brandingInformation).progressBar = [[CHIPContentLauncherClusterStyleInformation alloc] init]; @@ -67805,7 +64329,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { .progressBar) .size) .metric - = [NSNumber numberWithUnsignedChar:0]; + = [NSNumber numberWithUnsignedChar:0U]; ((CHIPContentLauncherClusterBrandingInformation *) params.brandingInformation).splash = [[CHIPContentLauncherClusterStyleInformation alloc] init]; @@ -67841,7 +64365,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { .splash) .size) .metric - = [NSNumber numberWithUnsignedChar:0]; + = [NSNumber numberWithUnsignedChar:0U]; ((CHIPContentLauncherClusterBrandingInformation *) params.brandingInformation).waterMark = [[CHIPContentLauncherClusterStyleInformation alloc] init]; @@ -67877,7 +64401,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { .waterMark) .size) .metric - = [NSNumber numberWithUnsignedChar:0]; + = [NSNumber numberWithUnsignedChar:0U]; [cluster launchURLWithParams:params completionHandler:^(CHIPContentLauncherClusterLaunchResponseParams * _Nullable values, NSError * _Nullable err) { @@ -67887,7 +64411,7 @@ class TV_ContentLauncherCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -68048,14 +64572,14 @@ class TV_MediaInputCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("InputList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).index, 1)); - VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).inputType, 4)); + VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).index, 1U)); + VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).inputType, 4U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).name, @"HDMI")); VerifyOrReturn( CheckValueAsString("description", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).descriptionString, @"High-Definition Multimedia Interface")); - VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).index, 2)); - VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).inputType, 4)); + VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).index, 2U)); + VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).inputType, 4U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).name, @"HDMI")); VerifyOrReturn( CheckValueAsString("description", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).descriptionString, @@ -68081,7 +64605,7 @@ class TV_MediaInputCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1)); + VerifyOrReturn(CheckValue("CurrentInput", actualValue, 1U)); } NextTest(); @@ -68097,7 +64621,7 @@ class TV_MediaInputCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPMediaInputClusterSelectInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; + params.index = [NSNumber numberWithUnsignedChar:1U]; [cluster selectInputWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Select Input Command Error: %@", err); @@ -68151,7 +64675,7 @@ class TV_MediaInputCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPMediaInputClusterRenameInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1]; + params.index = [NSNumber numberWithUnsignedChar:1U]; params.name = @"HDMI Test"; [cluster renameInputWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -68179,14 +64703,14 @@ class TV_MediaInputCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("InputList", [actualValue count], static_cast(2))); - VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).index, 1)); - VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).inputType, 4)); + VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).index, 1U)); + VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).inputType, 4U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).name, @"HDMI Test")); VerifyOrReturn( CheckValueAsString("description", ((CHIPMediaInputClusterInputInfo *) actualValue[0]).descriptionString, @"High-Definition Multimedia Interface")); - VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).index, 2)); - VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).inputType, 4)); + VerifyOrReturn(CheckValue("index", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).index, 2U)); + VerifyOrReturn(CheckValue("inputType", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).inputType, 4U)); VerifyOrReturn(CheckValueAsString("name", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).name, @"HDMI")); VerifyOrReturn( CheckValueAsString("description", ((CHIPMediaInputClusterInputInfo *) actualValue[1]).descriptionString, @@ -71852,7 +68376,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 7)); + VerifyOrReturn(CheckValue("returnValue", actualValue, 7U)); } NextTest(); @@ -71868,8 +68392,8 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3]; - params.arg2 = [NSNumber numberWithUnsignedChar:17]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params completionHandler:^( CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { @@ -71879,7 +68403,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20)); + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); } NextTest(); @@ -71895,8 +68419,8 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:250]; - params.arg2 = [NSNumber numberWithUnsignedChar:6]; + params.arg1 = [NSNumber numberWithUnsignedChar:250U]; + params.arg2 = [NSNumber numberWithUnsignedChar:6U]; [cluster testAddArgumentsWithParams:params completionHandler:^( CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { @@ -72028,7 +68552,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap8", actualValue, 0)); + VerifyOrReturn(CheckValue("bitmap8", actualValue, 0U)); } NextTest(); @@ -72044,7 +68568,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap8Argument; - bitmap8Argument = [NSNumber numberWithUnsignedChar:255]; + bitmap8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute BITMAP8 Max Value Error: %@", err); @@ -72070,7 +68594,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap8", actualValue, 255)); + VerifyOrReturn(CheckValue("bitmap8", actualValue, 255U)); } NextTest(); @@ -72086,7 +68610,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap8Argument; - bitmap8Argument = [NSNumber numberWithUnsignedChar:0]; + bitmap8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute BITMAP8 Min Value Error: %@", err); @@ -72112,7 +68636,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap8", actualValue, 0)); + VerifyOrReturn(CheckValue("bitmap8", actualValue, 0U)); } NextTest(); @@ -72452,7 +68976,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("int8u", actualValue, 0)); + VerifyOrReturn(CheckValue("int8u", actualValue, 0U)); } NextTest(); @@ -72468,7 +68992,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8uArgument; - int8uArgument = [NSNumber numberWithUnsignedChar:255]; + int8uArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeInt8uWithValue:int8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute INT8U Max Value Error: %@", err); @@ -72494,7 +69018,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("int8u", actualValue, 255)); + VerifyOrReturn(CheckValue("int8u", actualValue, 255U)); } NextTest(); @@ -72510,7 +69034,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8uArgument; - int8uArgument = [NSNumber numberWithUnsignedChar:0]; + int8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeInt8uWithValue:int8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute INT8U Min Value Error: %@", err); @@ -72536,7 +69060,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("int8u", actualValue, 0)); + VerifyOrReturn(CheckValue("int8u", actualValue, 0U)); } NextTest(); @@ -73848,7 +70372,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("enum8", actualValue, 0)); + VerifyOrReturn(CheckValue("enum8", actualValue, 0U)); } NextTest(); @@ -73864,7 +70388,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum8Argument; - enum8Argument = [NSNumber numberWithUnsignedChar:255]; + enum8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeEnum8WithValue:enum8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute ENUM8 Max Value Error: %@", err); @@ -73890,7 +70414,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("enum8", actualValue, 255)); + VerifyOrReturn(CheckValue("enum8", actualValue, 255U)); } NextTest(); @@ -73906,7 +70430,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum8Argument; - enum8Argument = [NSNumber numberWithUnsignedChar:0]; + enum8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeEnum8WithValue:enum8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute ENUM8 Min Value Error: %@", err); @@ -73932,7 +70456,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("enum8", actualValue, 0)); + VerifyOrReturn(CheckValue("enum8", actualValue, 0U)); } NextTest(); @@ -75188,7 +71712,7 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestEnumsRequestParams alloc] init]; params.arg1 = [NSNumber numberWithUnsignedShort:20003U]; - params.arg2 = [NSNumber numberWithUnsignedChar:101]; + params.arg2 = [NSNumber numberWithUnsignedChar:101U]; [cluster testEnumsRequestWithParams:params completionHandler:^( CHIPTestClusterClusterTestEnumsResponseParams * _Nullable values, NSError * _Nullable err) { @@ -75203,7 +71727,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = values.arg2; - VerifyOrReturn(CheckValue("arg2", actualValue, 101)); + VerifyOrReturn(CheckValue("arg2", actualValue, 101U)); } NextTest(); @@ -75220,12 +71744,12 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestStructArgumentRequestParams alloc] init]; params.arg1 = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).e = @"char_string"; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0]; @@ -75255,12 +71779,12 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestStructArgumentRequestParams alloc] init]; params.arg1 = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:false]; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).e = @"char_string"; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0]; @@ -75290,20 +71814,20 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; params.arg1 = [[CHIPTestClusterClusterNestedStruct alloc] init]; - ((CHIPTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterNestedStruct *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).a = - [NSNumber numberWithUnsignedChar:0]; + [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).c = - [NSNumber numberWithUnsignedChar:2]; + [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).e = @"char_string"; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).f = - [NSNumber numberWithUnsignedChar:1]; + [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).h = @@ -75336,20 +71860,20 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestNestedStructArgumentRequestParams alloc] init]; params.arg1 = [[CHIPTestClusterClusterNestedStruct alloc] init]; - ((CHIPTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterNestedStruct *) params.arg1).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterNestedStruct *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).a = - [NSNumber numberWithUnsignedChar:0]; + [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).b = [NSNumber numberWithBool:false]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).c = - [NSNumber numberWithUnsignedChar:2]; + [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).e = @"char_string"; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).f = - [NSNumber numberWithUnsignedChar:1]; + [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStruct *) params.arg1).c).h = @@ -75382,20 +71906,20 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; params.arg1 = [[CHIPTestClusterClusterNestedStructList alloc] init]; - ((CHIPTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterNestedStructList *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).a = - [NSNumber numberWithUnsignedChar:0]; + [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).c = - [NSNumber numberWithUnsignedChar:2]; + [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).e = @"char_string"; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).f = - [NSNumber numberWithUnsignedChar:1]; + [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).h = @@ -75404,22 +71928,22 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; temp_1[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0]; temp_1[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0]; @@ -75441,8 +71965,8 @@ class TestCluster : public TestCommandBridge { } { NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; - temp_1[0] = [NSNumber numberWithUnsignedChar:0]; - temp_1[1] = [NSNumber numberWithUnsignedChar:255]; + temp_1[0] = [NSNumber numberWithUnsignedChar:0U]; + temp_1[1] = [NSNumber numberWithUnsignedChar:255U]; ((CHIPTestClusterClusterNestedStructList *) params.arg1).g = temp_1; } @@ -75474,20 +71998,20 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestNestedStructListArgumentRequestParams alloc] init]; params.arg1 = [[CHIPTestClusterClusterNestedStructList alloc] init]; - ((CHIPTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) params.arg1).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterNestedStructList *) params.arg1).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterNestedStructList *) params.arg1).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).a = - [NSNumber numberWithUnsignedChar:0]; + [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).c = - [NSNumber numberWithUnsignedChar:2]; + [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).e = @"char_string"; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).f = - [NSNumber numberWithUnsignedChar:1]; + [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) params.arg1).c).h = @@ -75496,22 +72020,22 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; temp_1[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).a = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[0]).h = [NSNumber numberWithDouble:0]; temp_1[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).a = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).b = [NSNumber numberWithBool:false]; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_1[1]).h = [NSNumber numberWithDouble:0]; @@ -75533,8 +72057,8 @@ class TestCluster : public TestCommandBridge { } { NSMutableArray * temp_1 = [[NSMutableArray alloc] init]; - temp_1[0] = [NSNumber numberWithUnsignedChar:0]; - temp_1[1] = [NSNumber numberWithUnsignedChar:255]; + temp_1[0] = [NSNumber numberWithUnsignedChar:0U]; + temp_1[1] = [NSNumber numberWithUnsignedChar:255U]; ((CHIPTestClusterClusterNestedStructList *) params.arg1).g = temp_1; } @@ -75566,12 +72090,12 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterSimpleStructEchoRequestParams alloc] init]; params.arg1 = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:17]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).a = [NSNumber numberWithUnsignedChar:17U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).b = [NSNumber numberWithBool:false]; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).c = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).e = @"char_string"; - ((CHIPTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) params.arg1).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).g = [NSNumber numberWithFloat:0.1f]; ((CHIPTestClusterClusterSimpleStruct *) params.arg1).h = [NSNumber numberWithDouble:0.1]; @@ -75585,14 +72109,14 @@ class TestCluster : public TestCommandBridge { { id actualValue = values.arg1; - VerifyOrReturn(CheckValue("a", ((CHIPTestClusterClusterSimpleStruct *) actualValue).a, 17)); + VerifyOrReturn(CheckValue("a", ((CHIPTestClusterClusterSimpleStruct *) actualValue).a, 17U)); VerifyOrReturn(CheckValue("b", ((CHIPTestClusterClusterSimpleStruct *) actualValue).b, false)); - VerifyOrReturn(CheckValue("c", ((CHIPTestClusterClusterSimpleStruct *) actualValue).c, 2)); + VerifyOrReturn(CheckValue("c", ((CHIPTestClusterClusterSimpleStruct *) actualValue).c, 2U)); VerifyOrReturn(CheckValueAsString("d", ((CHIPTestClusterClusterSimpleStruct *) actualValue).d, [[NSData alloc] initWithBytes:"octet_string" length:12])); VerifyOrReturn(CheckValueAsString( "e", ((CHIPTestClusterClusterSimpleStruct *) actualValue).e, @"char_string")); - VerifyOrReturn(CheckValue("f", ((CHIPTestClusterClusterSimpleStruct *) actualValue).f, 1)); + VerifyOrReturn(CheckValue("f", ((CHIPTestClusterClusterSimpleStruct *) actualValue).f, 1U)); VerifyOrReturn(CheckValue("g", ((CHIPTestClusterClusterSimpleStruct *) actualValue).g, 0.1f)); VerifyOrReturn(CheckValue("h", ((CHIPTestClusterClusterSimpleStruct *) actualValue).h, 0.1)); } @@ -75612,15 +72136,15 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [NSNumber numberWithUnsignedChar:1]; - temp_0[1] = [NSNumber numberWithUnsignedChar:2]; - temp_0[2] = [NSNumber numberWithUnsignedChar:3]; - temp_0[3] = [NSNumber numberWithUnsignedChar:4]; - temp_0[4] = [NSNumber numberWithUnsignedChar:5]; - temp_0[5] = [NSNumber numberWithUnsignedChar:6]; - temp_0[6] = [NSNumber numberWithUnsignedChar:7]; - temp_0[7] = [NSNumber numberWithUnsignedChar:8]; - temp_0[8] = [NSNumber numberWithUnsignedChar:9]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2U]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3U]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4U]; + temp_0[4] = [NSNumber numberWithUnsignedChar:5U]; + temp_0[5] = [NSNumber numberWithUnsignedChar:6U]; + temp_0[6] = [NSNumber numberWithUnsignedChar:7U]; + temp_0[7] = [NSNumber numberWithUnsignedChar:8U]; + temp_0[8] = [NSNumber numberWithUnsignedChar:9U]; params.arg1 = temp_0; } [cluster @@ -75651,16 +72175,16 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestListInt8UArgumentRequestParams alloc] init]; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [NSNumber numberWithUnsignedChar:1]; - temp_0[1] = [NSNumber numberWithUnsignedChar:2]; - temp_0[2] = [NSNumber numberWithUnsignedChar:3]; - temp_0[3] = [NSNumber numberWithUnsignedChar:4]; - temp_0[4] = [NSNumber numberWithUnsignedChar:5]; - temp_0[5] = [NSNumber numberWithUnsignedChar:6]; - temp_0[6] = [NSNumber numberWithUnsignedChar:7]; - temp_0[7] = [NSNumber numberWithUnsignedChar:8]; - temp_0[8] = [NSNumber numberWithUnsignedChar:9]; - temp_0[9] = [NSNumber numberWithUnsignedChar:0]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2U]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3U]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4U]; + temp_0[4] = [NSNumber numberWithUnsignedChar:5U]; + temp_0[5] = [NSNumber numberWithUnsignedChar:6U]; + temp_0[6] = [NSNumber numberWithUnsignedChar:7U]; + temp_0[7] = [NSNumber numberWithUnsignedChar:8U]; + temp_0[8] = [NSNumber numberWithUnsignedChar:9U]; + temp_0[9] = [NSNumber numberWithUnsignedChar:0U]; params.arg1 = temp_0; } [cluster testListInt8UArgumentRequestWithParams:params @@ -75690,15 +72214,15 @@ class TestCluster : public TestCommandBridge { __auto_type * params = [[CHIPTestClusterClusterTestListInt8UReverseRequestParams alloc] init]; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [NSNumber numberWithUnsignedChar:1]; - temp_0[1] = [NSNumber numberWithUnsignedChar:2]; - temp_0[2] = [NSNumber numberWithUnsignedChar:3]; - temp_0[3] = [NSNumber numberWithUnsignedChar:4]; - temp_0[4] = [NSNumber numberWithUnsignedChar:5]; - temp_0[5] = [NSNumber numberWithUnsignedChar:6]; - temp_0[6] = [NSNumber numberWithUnsignedChar:7]; - temp_0[7] = [NSNumber numberWithUnsignedChar:8]; - temp_0[8] = [NSNumber numberWithUnsignedChar:9]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2U]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3U]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4U]; + temp_0[4] = [NSNumber numberWithUnsignedChar:5U]; + temp_0[5] = [NSNumber numberWithUnsignedChar:6U]; + temp_0[6] = [NSNumber numberWithUnsignedChar:7U]; + temp_0[7] = [NSNumber numberWithUnsignedChar:8U]; + temp_0[8] = [NSNumber numberWithUnsignedChar:9U]; params.arg1 = temp_0; } [cluster @@ -75712,15 +72236,15 @@ class TestCluster : public TestCommandBridge { { id actualValue = values.arg1; VerifyOrReturn(CheckValue("arg1", [actualValue count], static_cast(9))); - VerifyOrReturn(CheckValue("", actualValue[0], 9)); - VerifyOrReturn(CheckValue("", actualValue[1], 8)); - VerifyOrReturn(CheckValue("", actualValue[2], 7)); - VerifyOrReturn(CheckValue("", actualValue[3], 6)); - VerifyOrReturn(CheckValue("", actualValue[4], 5)); - VerifyOrReturn(CheckValue("", actualValue[5], 4)); - VerifyOrReturn(CheckValue("", actualValue[6], 3)); - VerifyOrReturn(CheckValue("", actualValue[7], 2)); - VerifyOrReturn(CheckValue("", actualValue[8], 1)); + VerifyOrReturn(CheckValue("", actualValue[0], 9U)); + VerifyOrReturn(CheckValue("", actualValue[1], 8U)); + VerifyOrReturn(CheckValue("", actualValue[2], 7U)); + VerifyOrReturn(CheckValue("", actualValue[3], 6U)); + VerifyOrReturn(CheckValue("", actualValue[4], 5U)); + VerifyOrReturn(CheckValue("", actualValue[5], 4U)); + VerifyOrReturn(CheckValue("", actualValue[6], 3U)); + VerifyOrReturn(CheckValue("", actualValue[7], 2U)); + VerifyOrReturn(CheckValue("", actualValue[8], 1U)); } NextTest(); @@ -75769,22 +72293,22 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).e = @"first_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0]; temp_0[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).e = @"second_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0]; @@ -75820,22 +72344,22 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).d = [[NSData alloc] initWithBytes:"second_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).e = @"second_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[0]).h = [NSNumber numberWithDouble:0]; temp_0[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).b = [NSNumber numberWithBool:false]; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).c = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).d = [[NSData alloc] initWithBytes:"first_octet_string" length:18]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).e = @"first_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_0[1]).h = [NSNumber numberWithDouble:0]; @@ -75871,20 +72395,20 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPTestClusterClusterNestedStructList alloc] init]; - ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).a = - [NSNumber numberWithUnsignedChar:0]; + [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).c = - [NSNumber numberWithUnsignedChar:2]; + [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).e = @"char_string"; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).f = - [NSNumber numberWithUnsignedChar:1]; + [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).h = @@ -75893,24 +72417,24 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; temp_2[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0]; temp_2[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0]; @@ -75932,8 +72456,8 @@ class TestCluster : public TestCommandBridge { } { NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; - temp_2[0] = [NSNumber numberWithUnsignedChar:0]; - temp_2[1] = [NSNumber numberWithUnsignedChar:255]; + temp_2[0] = [NSNumber numberWithUnsignedChar:0U]; + temp_2[1] = [NSNumber numberWithUnsignedChar:255U]; ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).g = temp_2; } @@ -75969,20 +72493,20 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPTestClusterClusterNestedStructList alloc] init]; - ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0]; + ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).a = [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c = [[CHIPTestClusterClusterSimpleStruct alloc] init]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).a = - [NSNumber numberWithUnsignedChar:0]; + [NSNumber numberWithUnsignedChar:0U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).b = [NSNumber numberWithBool:true]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).c = - [NSNumber numberWithUnsignedChar:2]; + [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).d = [[NSData alloc] initWithBytes:"octet_string" length:12]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).e = @"char_string"; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).f = - [NSNumber numberWithUnsignedChar:1]; + [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).c).h = @@ -75991,24 +72515,24 @@ class TestCluster : public TestCommandBridge { { NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; temp_2[0] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).a = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[0]).h = [NSNumber numberWithDouble:0]; temp_2[1] = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).a = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).b = [NSNumber numberWithBool:false]; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).c = [NSNumber numberWithUnsignedChar:3U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).d = [[NSData alloc] initWithBytes:"nested_octet_string" length:19]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).e = @"nested_char_string"; - ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1]; + ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).f = [NSNumber numberWithUnsignedChar:1U]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).g = [NSNumber numberWithFloat:0.0f]; ((CHIPTestClusterClusterSimpleStruct *) temp_2[1]).h = [NSNumber numberWithDouble:0]; @@ -76030,8 +72554,8 @@ class TestCluster : public TestCommandBridge { } { NSMutableArray * temp_2 = [[NSMutableArray alloc] init]; - temp_2[0] = [NSNumber numberWithUnsignedChar:0]; - temp_2[1] = [NSNumber numberWithUnsignedChar:255]; + temp_2[0] = [NSNumber numberWithUnsignedChar:0U]; + temp_2[1] = [NSNumber numberWithUnsignedChar:255U]; ((CHIPTestClusterClusterNestedStructList *) temp_0[0]).g = temp_2; } @@ -76066,10 +72590,10 @@ class TestCluster : public TestCommandBridge { id listInt8uArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [NSNumber numberWithUnsignedChar:1]; - temp_0[1] = [NSNumber numberWithUnsignedChar:2]; - temp_0[2] = [NSNumber numberWithUnsignedChar:3]; - temp_0[3] = [NSNumber numberWithUnsignedChar:4]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2U]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3U]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4U]; listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument @@ -76098,10 +72622,10 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("list_int8u", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("", actualValue[0], 1)); - VerifyOrReturn(CheckValue("", actualValue[1], 2)); - VerifyOrReturn(CheckValue("", actualValue[2], 3)); - VerifyOrReturn(CheckValue("", actualValue[3], 4)); + VerifyOrReturn(CheckValue("", actualValue[0], 1U)); + VerifyOrReturn(CheckValue("", actualValue[1], 2U)); + VerifyOrReturn(CheckValue("", actualValue[2], 3U)); + VerifyOrReturn(CheckValue("", actualValue[3], 4U)); } NextTest(); @@ -76243,7 +72767,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestNullableOptionalRequestParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:5]; + params.arg1 = [NSNumber numberWithUnsignedChar:5U]; [cluster testNullableOptionalRequestWithParams:params completionHandler:^(CHIPTestClusterClusterTestNullableOptionalResponseParams * _Nullable values, @@ -76264,13 +72788,13 @@ class TestCluster : public TestCommandBridge { { id actualValue = values.value; - VerifyOrReturn(CheckValue("value", actualValue, 5)); + VerifyOrReturn(CheckValue("value", actualValue, 5U)); } { id actualValue = values.originalValue; VerifyOrReturn(CheckValueNonNull("originalValue", actualValue)); - VerifyOrReturn(CheckValue("originalValue", actualValue, 5)); + VerifyOrReturn(CheckValue("originalValue", actualValue, 5U)); } NextTest(); @@ -76351,8 +72875,8 @@ class TestCluster : public TestCommandBridge { ((CHIPTestClusterClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableStruct = nil; { NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; - temp_3[0] = [NSNumber numberWithUnsignedChar:1]; - temp_3[1] = [NSNumber numberWithUnsignedChar:2]; + temp_3[0] = [NSNumber numberWithUnsignedChar:1U]; + temp_3[1] = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterNullablesAndOptionalsStruct *) temp_0[0]).nullableList = temp_3; } @@ -76399,9 +72923,9 @@ class TestCluster : public TestCommandBridge { [((CHIPTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList count], static_cast(2))); VerifyOrReturn( - CheckValue("", ((CHIPTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[0], 1)); + CheckValue("", ((CHIPTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[0], 1U)); VerifyOrReturn( - CheckValue("", ((CHIPTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[1], 2)); + CheckValue("", ((CHIPTestClusterClusterNullablesAndOptionalsStruct *) actualValue[0]).nullableList[1], 2U)); } NextTest(); @@ -76527,7 +73051,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap8Argument; - nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:254]; + nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_BITMAP8 Max Value Error: %@", err); @@ -76554,7 +73078,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_bitmap8", actualValue)); - VerifyOrReturn(CheckValue("nullable_bitmap8", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_bitmap8", actualValue, 254U)); } NextTest(); @@ -76570,7 +73094,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableBitmap8Argument; - nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:255]; + nullableBitmap8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeNullableBitmap8WithValue:nullableBitmap8Argument completionHandler:^(NSError * _Nullable err) { @@ -76598,7 +73122,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_bitmap8", actualValue)); - VerifyOrReturn(CheckValue("nullable_bitmap8", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_bitmap8", actualValue, 254U)); } { nullableValue254 = value; @@ -77064,7 +73588,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; - nullableInt8uArgument = [NSNumber numberWithUnsignedChar:0]; + nullableInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8U Min Value Error: %@", err); @@ -77091,7 +73615,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_int8u", actualValue, 0)); + VerifyOrReturn(CheckValue("nullable_int8u", actualValue, 0U)); } NextTest(); @@ -77107,7 +73631,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; - nullableInt8uArgument = [NSNumber numberWithUnsignedChar:254]; + nullableInt8uArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8U Max Value Error: %@", err); @@ -77134,7 +73658,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_int8u", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_int8u", actualValue, 254U)); } NextTest(); @@ -77150,7 +73674,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; - nullableInt8uArgument = [NSNumber numberWithUnsignedChar:255]; + nullableInt8uArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8U Invalid Value Error: %@", err); @@ -77176,7 +73700,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_int8u", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_int8u", actualValue, 254U)); } NextTest(); @@ -77261,8 +73785,8 @@ class TestCluster : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", [value unsignedCharValue], 254U)); } NextTest(); @@ -77284,7 +73808,7 @@ class TestCluster : public TestCommandBridge { if (value != nil) { } - VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", value, 254)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", value, 254U)); NextTest(); }]; @@ -77299,7 +73823,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableInt8uArgument; - nullableInt8uArgument = [NSNumber numberWithUnsignedChar:128]; + nullableInt8uArgument = [NSNumber numberWithUnsignedChar:128U]; [cluster writeAttributeNullableInt8uWithValue:nullableInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_INT8U Value Error: %@", err); @@ -77325,8 +73849,8 @@ class TestCluster : public TestCommandBridge { if (value != nil) { - VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", [value unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", [value unsignedCharValue], 254)); + VerifyOrReturn(CheckConstraintMinValue("nullableInt8u", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("nullableInt8u", [value unsignedCharValue], 254U)); } NextTest(); @@ -77348,7 +73872,7 @@ class TestCluster : public TestCommandBridge { if (value != nil) { } - VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", value, 129)); + VerifyOrReturn(CheckConstraintNotValue("nullableInt8u", value, 129U)); NextTest(); }]; @@ -79573,7 +76097,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum8Argument; - nullableEnum8Argument = [NSNumber numberWithUnsignedChar:0]; + nullableEnum8Argument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_ENUM8 Min Value Error: %@", err); @@ -79600,7 +76124,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_enum8", actualValue)); - VerifyOrReturn(CheckValue("nullable_enum8", actualValue, 0)); + VerifyOrReturn(CheckValue("nullable_enum8", actualValue, 0U)); } NextTest(); @@ -79616,7 +76140,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum8Argument; - nullableEnum8Argument = [NSNumber numberWithUnsignedChar:254]; + nullableEnum8Argument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_ENUM8 Max Value Error: %@", err); @@ -79643,7 +76167,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_enum8", actualValue)); - VerifyOrReturn(CheckValue("nullable_enum8", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_enum8", actualValue, 254U)); } NextTest(); @@ -79659,7 +76183,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnum8Argument; - nullableEnum8Argument = [NSNumber numberWithUnsignedChar:255]; + nullableEnum8Argument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeNullableEnum8WithValue:nullableEnum8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_ENUM8 Invalid Value Error: %@", err); @@ -79685,7 +76209,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_enum8", actualValue)); - VerifyOrReturn(CheckValue("nullable_enum8", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_enum8", actualValue, 254U)); } NextTest(); @@ -79914,7 +76438,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnumAttrArgument; - nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:0]; + nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Min Value Error: %@", err); @@ -79941,7 +76465,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_enum_attr", actualValue)); - VerifyOrReturn(CheckValue("nullable_enum_attr", actualValue, 0)); + VerifyOrReturn(CheckValue("nullable_enum_attr", actualValue, 0U)); } NextTest(); @@ -79957,7 +76481,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnumAttrArgument; - nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:254]; + nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute NULLABLE_SIMPLE_ENUM Max Value Error: %@", err); @@ -79984,7 +76508,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_enum_attr", actualValue)); - VerifyOrReturn(CheckValue("nullable_enum_attr", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_enum_attr", actualValue, 254U)); } NextTest(); @@ -80000,7 +76524,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableEnumAttrArgument; - nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:255]; + nullableEnumAttrArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeNullableEnumAttrWithValue:nullableEnumAttrArgument completionHandler:^(NSError * _Nullable err) { @@ -80028,7 +76552,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_enum_attr", actualValue)); - VerifyOrReturn(CheckValue("nullable_enum_attr", actualValue, 254)); + VerifyOrReturn(CheckValue("nullable_enum_attr", actualValue, 254U)); } { nullableEnumAttr254 = value; @@ -80575,10 +77099,10 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("list_int8u", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("", actualValue[0], 1)); - VerifyOrReturn(CheckValue("", actualValue[1], 2)); - VerifyOrReturn(CheckValue("", actualValue[2], 3)); - VerifyOrReturn(CheckValue("", actualValue[3], 4)); + VerifyOrReturn(CheckValue("", actualValue[0], 1U)); + VerifyOrReturn(CheckValue("", actualValue[1], 2U)); + VerifyOrReturn(CheckValue("", actualValue[2], 3U)); + VerifyOrReturn(CheckValue("", actualValue[3], 4U)); } testSendClusterTestCluster_374_WaitForReport_Fulfilled = true; @@ -80628,10 +77152,10 @@ class TestCluster : public TestCommandBridge { id listInt8uArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [NSNumber numberWithUnsignedChar:5]; - temp_0[1] = [NSNumber numberWithUnsignedChar:6]; - temp_0[2] = [NSNumber numberWithUnsignedChar:7]; - temp_0[3] = [NSNumber numberWithUnsignedChar:8]; + temp_0[0] = [NSNumber numberWithUnsignedChar:5U]; + temp_0[1] = [NSNumber numberWithUnsignedChar:6U]; + temp_0[2] = [NSNumber numberWithUnsignedChar:7U]; + temp_0[3] = [NSNumber numberWithUnsignedChar:8U]; listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument @@ -80660,10 +77184,10 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("list_int8u", [actualValue count], static_cast(4))); - VerifyOrReturn(CheckValue("", actualValue[0], 5)); - VerifyOrReturn(CheckValue("", actualValue[1], 6)); - VerifyOrReturn(CheckValue("", actualValue[2], 7)); - VerifyOrReturn(CheckValue("", actualValue[3], 8)); + VerifyOrReturn(CheckValue("", actualValue[0], 5U)); + VerifyOrReturn(CheckValue("", actualValue[1], 6U)); + VerifyOrReturn(CheckValue("", actualValue[2], 7U)); + VerifyOrReturn(CheckValue("", actualValue[3], 8U)); } NextTest(); @@ -80685,7 +77209,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 70)); + VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 70U)); } NextTest(); @@ -80701,7 +77225,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0]; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { @@ -80722,7 +77246,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19]; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write just-below-range value to a range-restricted unsigned 8-bit integer " @@ -80744,7 +77268,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101]; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write just-above-range value to a range-restricted unsigned 8-bit integer " @@ -80766,7 +77290,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:255]; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:255U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { @@ -80793,7 +77317,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 70)); + VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 70U)); } NextTest(); @@ -80809,7 +77333,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20]; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { @@ -80837,7 +77361,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 20)); + VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 20U)); } NextTest(); @@ -80853,7 +77377,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100]; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { @@ -80881,7 +77405,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 100)); + VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 100U)); } NextTest(); @@ -80897,7 +77421,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id rangeRestrictedInt8uArgument; - rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50]; + rangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50U]; [cluster writeAttributeRangeRestrictedInt8uWithValue:rangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { @@ -80925,7 +77449,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 50)); + VerifyOrReturn(CheckValue("range_restricted_int8u", actualValue, 50U)); } NextTest(); @@ -81734,7 +78258,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70U)); } NextTest(); @@ -81750,7 +78274,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0]; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write min value to a nullable range-restricted unsigned 8-bit " @@ -81772,7 +78296,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19]; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:19U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write just-below-range value to a nullable range-restricted " @@ -81794,7 +78318,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101]; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:101U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write just-above-range value to a nullable range-restricted " @@ -81816,7 +78340,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:254]; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:254U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write max value to a nullable range-restricted unsigned 8-bit " @@ -81846,7 +78370,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 70U)); } NextTest(); @@ -81862,7 +78386,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20]; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:20U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write min valid value to a nullable range-restricted unsigned 8-bit " @@ -81892,7 +78416,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 20)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 20U)); } NextTest(); @@ -81908,7 +78432,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100]; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:100U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write max valid value to a nullable range-restricted unsigned 8-bit " @@ -81938,7 +78462,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 100)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 100U)); } NextTest(); @@ -81954,7 +78478,7 @@ class TestCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id nullableRangeRestrictedInt8uArgument; - nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50]; + nullableRangeRestrictedInt8uArgument = [NSNumber numberWithUnsignedChar:50U]; [cluster writeAttributeNullableRangeRestrictedInt8uWithValue:nullableRangeRestrictedInt8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write middle valid value to a nullable range-restricted unsigned " @@ -81984,7 +78508,7 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("nullable_range_restricted_int8u", actualValue)); - VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 50)); + VerifyOrReturn(CheckValue("nullable_range_restricted_int8u", actualValue, 50U)); } NextTest(); @@ -83146,12 +79670,12 @@ class TestCluster : public TestCommandBridge { id structAttrArgument; structAttrArgument = [[CHIPTestClusterClusterSimpleStruct alloc] init]; - ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).a = [NSNumber numberWithUnsignedChar:5]; + ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).a = [NSNumber numberWithUnsignedChar:5U]; ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).b = [NSNumber numberWithBool:true]; - ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).c = [NSNumber numberWithUnsignedChar:2]; + ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).c = [NSNumber numberWithUnsignedChar:2U]; ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).d = [[NSData alloc] initWithBytes:"abc" length:3]; ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).e = @""; - ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).f = [NSNumber numberWithUnsignedChar:17]; + ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).f = [NSNumber numberWithUnsignedChar:17U]; ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).g = [NSNumber numberWithFloat:1.5f]; ((CHIPTestClusterClusterSimpleStruct *) structAttrArgument).h = [NSNumber numberWithDouble:3.14159265358979]; @@ -83181,13 +79705,13 @@ class TestCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("a", ((CHIPTestClusterClusterSimpleStruct *) actualValue).a, 5)); + VerifyOrReturn(CheckValue("a", ((CHIPTestClusterClusterSimpleStruct *) actualValue).a, 5U)); VerifyOrReturn(CheckValue("b", ((CHIPTestClusterClusterSimpleStruct *) actualValue).b, true)); - VerifyOrReturn(CheckValue("c", ((CHIPTestClusterClusterSimpleStruct *) actualValue).c, 2)); + VerifyOrReturn(CheckValue("c", ((CHIPTestClusterClusterSimpleStruct *) actualValue).c, 2U)); VerifyOrReturn(CheckValueAsString( "d", ((CHIPTestClusterClusterSimpleStruct *) actualValue).d, [[NSData alloc] initWithBytes:"abc" length:3])); VerifyOrReturn(CheckValueAsString("e", ((CHIPTestClusterClusterSimpleStruct *) actualValue).e, @"")); - VerifyOrReturn(CheckValue("f", ((CHIPTestClusterClusterSimpleStruct *) actualValue).f, 17)); + VerifyOrReturn(CheckValue("f", ((CHIPTestClusterClusterSimpleStruct *) actualValue).f, 17U)); VerifyOrReturn(CheckValue("g", ((CHIPTestClusterClusterSimpleStruct *) actualValue).g, 1.5f)); VerifyOrReturn(CheckValue("h", ((CHIPTestClusterClusterSimpleStruct *) actualValue).h, 3.14159265358979)); } @@ -83470,10 +79994,10 @@ class TestConstraints : public TestCommandBridge { id listInt8uArgument; { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; - temp_0[0] = [NSNumber numberWithUnsignedChar:1]; - temp_0[1] = [NSNumber numberWithUnsignedChar:2]; - temp_0[2] = [NSNumber numberWithUnsignedChar:3]; - temp_0[3] = [NSNumber numberWithUnsignedChar:4]; + temp_0[0] = [NSNumber numberWithUnsignedChar:1U]; + temp_0[1] = [NSNumber numberWithUnsignedChar:2U]; + temp_0[2] = [NSNumber numberWithUnsignedChar:3U]; + temp_0[3] = [NSNumber numberWithUnsignedChar:4U]; listInt8uArgument = temp_0; } [cluster writeAttributeListInt8uWithValue:listInt8uArgument @@ -83499,9 +80023,9 @@ class TestConstraints : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintContains("listInt8u", value, 2)); - VerifyOrReturn(CheckConstraintContains("listInt8u", value, 3)); - VerifyOrReturn(CheckConstraintContains("listInt8u", value, 4)); + VerifyOrReturn(CheckConstraintContains("listInt8u", value, 2U)); + VerifyOrReturn(CheckConstraintContains("listInt8u", value, 3U)); + VerifyOrReturn(CheckConstraintContains("listInt8u", value, 4U)); NextTest(); }]; @@ -83520,8 +80044,8 @@ class TestConstraints : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintExcludes("listInt8u", value, 0)); - VerifyOrReturn(CheckConstraintExcludes("listInt8u", value, 5)); + VerifyOrReturn(CheckConstraintExcludes("listInt8u", value, 0U)); + VerifyOrReturn(CheckConstraintExcludes("listInt8u", value, 5U)); NextTest(); }]; @@ -85025,8 +81549,8 @@ class TestSaveAs : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3]; - params.arg2 = [NSNumber numberWithUnsignedChar:17]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params completionHandler:^( CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { @@ -85036,7 +81560,7 @@ class TestSaveAs : public TestCommandBridge { { id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20)); + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); } { TestAddArgumentDefaultValue = values.returnValue; @@ -85055,8 +81579,8 @@ class TestSaveAs : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3]; - params.arg2 = [NSNumber numberWithUnsignedChar:17]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params completionHandler:^( CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { @@ -85082,7 +81606,7 @@ class TestSaveAs : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; params.arg2 = [TestAddArgumentDefaultValue copy]; [cluster testAddArgumentsWithParams:params @@ -85221,7 +81745,7 @@ class TestSaveAs : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("bitmap8", actualValue, 0)); + VerifyOrReturn(CheckValue("bitmap8", actualValue, 0U)); } { readAttributeBitmap8DefaultValue = value; @@ -85240,7 +81764,7 @@ class TestSaveAs : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id bitmap8Argument; - bitmap8Argument = [NSNumber numberWithUnsignedChar:1]; + bitmap8Argument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeBitmap8WithValue:bitmap8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute BITMAP8 Not Default Value Error: %@", err); @@ -85649,7 +82173,7 @@ class TestSaveAs : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("int8u", actualValue, 0)); + VerifyOrReturn(CheckValue("int8u", actualValue, 0U)); } { readAttributeInt8uDefaultValue = value; @@ -85668,7 +82192,7 @@ class TestSaveAs : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id int8uArgument; - int8uArgument = [NSNumber numberWithUnsignedChar:1]; + int8uArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeInt8uWithValue:int8uArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute INT8U Not Default Value Error: %@", err); @@ -86505,7 +83029,7 @@ class TestSaveAs : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("enum8", actualValue, 0)); + VerifyOrReturn(CheckValue("enum8", actualValue, 0U)); } { readAttributeEnum8DefaultValue = value; @@ -86524,7 +83048,7 @@ class TestSaveAs : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id enum8Argument; - enum8Argument = [NSNumber numberWithUnsignedChar:1]; + enum8Argument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeEnum8WithValue:enum8Argument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write attribute ENUM8 Not Default Value Error: %@", err); @@ -87502,8 +84026,8 @@ class TestConfigVariables : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = [NSNumber numberWithUnsignedChar:3]; - params.arg2 = [NSNumber numberWithUnsignedChar:17]; + params.arg1 = [NSNumber numberWithUnsignedChar:3U]; + params.arg2 = [NSNumber numberWithUnsignedChar:17U]; [cluster testAddArgumentsWithParams:params completionHandler:^( CHIPTestClusterClusterTestAddArgumentsResponseParams * _Nullable values, NSError * _Nullable err) { @@ -87513,7 +84037,7 @@ class TestConfigVariables : public TestCommandBridge { { id actualValue = values.returnValue; - VerifyOrReturn(CheckValue("returnValue", actualValue, 20)); + VerifyOrReturn(CheckValue("returnValue", actualValue, 20U)); } { TestAddArgumentDefaultValue = values.returnValue; @@ -87532,7 +84056,7 @@ class TestConfigVariables : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPTestClusterClusterTestAddArgumentsParams alloc] init]; - params.arg1 = mArg1.HasValue() ? [NSNumber numberWithUnsignedChar:mArg1.Value()] : [NSNumber numberWithUnsignedChar:5]; + params.arg1 = mArg1.HasValue() ? [NSNumber numberWithUnsignedChar:mArg1.Value()] : [NSNumber numberWithUnsignedChar:5U]; params.arg2 = [TestAddArgumentDefaultValue copy]; [cluster testAddArgumentsWithParams:params completionHandler:^( @@ -87544,7 +84068,7 @@ class TestConfigVariables : public TestCommandBridge { { id actualValue = values.returnValue; VerifyOrReturn(CheckValue("returnValue", actualValue, - mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25)); + mReturnValueWithArg1.HasValue() ? mReturnValueWithArg1.Value() : 25U)); } NextTest(); @@ -88835,7 +85359,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 3)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 3U)); } NextTest(); @@ -88910,7 +85434,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); } NextTest(); @@ -89000,7 +85524,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); } NextTest(); @@ -89053,7 +85577,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 4)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 4U)); } NextTest(); @@ -89102,7 +85626,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 2)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 2U)); } NextTest(); @@ -89151,7 +85675,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); } NextTest(); @@ -89204,7 +85728,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); } NextTest(); @@ -89257,7 +85781,7 @@ class TestGeneralCommissioning : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); } NextTest(); @@ -89569,7 +86093,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("supportedFabrics", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("supportedFabrics", [value unsignedCharValue], 4)); + VerifyOrReturn(CheckConstraintMinValue("supportedFabrics", [value unsignedCharValue], 4U)); NextTest(); }]; @@ -89591,7 +86115,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("commissionedFabrics", [value unsignedCharValue], 1)); + VerifyOrReturn(CheckConstraintMinValue("commissionedFabrics", [value unsignedCharValue], 1U)); NextTest(); }]; @@ -89614,7 +86138,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1)); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { ourFabricIndex = value; } @@ -89634,7 +86158,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPOperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.fabricIndex = [NSNumber numberWithUnsignedChar:243]; + params.fabricIndex = [NSNumber numberWithUnsignedChar:243U]; [cluster removeFabricWithParams:params completionHandler:^( CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable err) { @@ -89644,7 +86168,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { { id actualValue = values.statusCode; - VerifyOrReturn(CheckValue("StatusCode", actualValue, 11)); + VerifyOrReturn(CheckValue("StatusCode", actualValue, 11U)); } NextTest(); @@ -89704,7 +86228,7 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { { id actualValue = values.statusCode; - VerifyOrReturn(CheckValue("StatusCode", actualValue, 0)); + VerifyOrReturn(CheckValue("StatusCode", actualValue, 0U)); } { @@ -90114,17 +86638,17 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("SupportedModes", [actualValue count], static_cast(3))); VerifyOrReturn( CheckValueAsString("Label", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[0]).label, @"Black")); - VerifyOrReturn(CheckValue("Mode", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[0]).mode, 0)); + VerifyOrReturn(CheckValue("Mode", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[0]).mode, 0U)); VerifyOrReturn(CheckValue("SemanticTags", [((CHIPModeSelectClusterModeOptionStruct *) actualValue[0]).semanticTags count], static_cast(1))); VerifyOrReturn( CheckValueAsString("Label", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[1]).label, @"Cappuccino")); - VerifyOrReturn(CheckValue("Mode", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[1]).mode, 4)); + VerifyOrReturn(CheckValue("Mode", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[1]).mode, 4U)); VerifyOrReturn(CheckValue("SemanticTags", [((CHIPModeSelectClusterModeOptionStruct *) actualValue[1]).semanticTags count], static_cast(1))); VerifyOrReturn( CheckValueAsString("Label", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[2]).label, @"Espresso")); - VerifyOrReturn(CheckValue("Mode", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[2]).mode, 7)); + VerifyOrReturn(CheckValue("Mode", ((CHIPModeSelectClusterModeOptionStruct *) actualValue[2]).mode, 7U)); VerifyOrReturn(CheckValue("SemanticTags", [((CHIPModeSelectClusterModeOptionStruct *) actualValue[2]).semanticTags count], static_cast(1))); } @@ -90148,7 +86672,7 @@ class TestModeSelectCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 0)); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 0U)); } NextTest(); @@ -90171,7 +86695,7 @@ class TestModeSelectCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("StartUpMode", actualValue)); - VerifyOrReturn(CheckValue("StartUpMode", actualValue, 0)); + VerifyOrReturn(CheckValue("StartUpMode", actualValue, 0U)); } NextTest(); @@ -90209,7 +86733,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPModeSelectClusterChangeToModeParams alloc] init]; - params.newMode = [NSNumber numberWithUnsignedChar:4]; + params.newMode = [NSNumber numberWithUnsignedChar:4U]; [cluster changeToModeWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Change to Supported Mode Error: %@", err); @@ -90236,7 +86760,7 @@ class TestModeSelectCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4)); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4U)); } { currentModeBeforeToggle = value; @@ -90255,7 +86779,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPModeSelectClusterChangeToModeParams alloc] init]; - params.newMode = [NSNumber numberWithUnsignedChar:2]; + params.newMode = [NSNumber numberWithUnsignedChar:2U]; [cluster changeToModeWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Change to Unsupported Mode Error: %@", err); @@ -90330,7 +86854,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onModeArgument; - onModeArgument = [NSNumber numberWithUnsignedChar:2]; + onModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeOnModeWithValue:onModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Change to Unsupported OnMode Error: %@", err); @@ -90349,7 +86873,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onModeArgument; - onModeArgument = [NSNumber numberWithUnsignedChar:7]; + onModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeOnModeWithValue:onModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Change OnMode Error: %@", err); @@ -90377,7 +86901,7 @@ class TestModeSelectCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("OnMode", actualValue)); - VerifyOrReturn(CheckValue("OnMode", actualValue, 7)); + VerifyOrReturn(CheckValue("OnMode", actualValue, 7U)); } { OnModeValue = value; @@ -90452,7 +86976,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpModeArgument; - startUpModeArgument = [NSNumber numberWithUnsignedChar:2]; + startUpModeArgument = [NSNumber numberWithUnsignedChar:2U]; [cluster writeAttributeStartUpModeWithValue:startUpModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Change to Unsupported StartUp Mode Error: %@", err); @@ -90471,7 +86995,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpModeArgument; - startUpModeArgument = [NSNumber numberWithUnsignedChar:7]; + startUpModeArgument = [NSNumber numberWithUnsignedChar:7U]; [cluster writeAttributeStartUpModeWithValue:startUpModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Change to Supported StartUp Mode Error: %@", err); @@ -90498,7 +87022,7 @@ class TestModeSelectCluster : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("StartUpMode", actualValue)); - VerifyOrReturn(CheckValue("StartUpMode", actualValue, 7)); + VerifyOrReturn(CheckValue("StartUpMode", actualValue, 7U)); } NextTest(); @@ -90514,7 +87038,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPModeSelectClusterChangeToModeParams alloc] init]; - params.newMode = [NSNumber numberWithUnsignedChar:0]; + params.newMode = [NSNumber numberWithUnsignedChar:0U]; [cluster changeToModeWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Change CurrentMode to another value Error: %@", err); @@ -90534,7 +87058,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id onModeArgument; - onModeArgument = [NSNumber numberWithUnsignedChar:4]; + onModeArgument = [NSNumber numberWithUnsignedChar:4U]; [cluster writeAttributeOnModeWithValue:onModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Change On Mode Error: %@", err); @@ -90554,7 +87078,7 @@ class TestModeSelectCluster : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id startUpOnOffArgument; - startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1]; + startUpOnOffArgument = [NSNumber numberWithUnsignedChar:1U]; [cluster writeAttributeStartUpOnOffWithValue:startUpOnOffArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Set StartUpOnOff Error: %@", err); @@ -90593,7 +87117,7 @@ class TestModeSelectCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4)); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 4U)); } NextTest(); @@ -90648,7 +87172,7 @@ class TestModeSelectCluster : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentMode", actualValue, 7)); + VerifyOrReturn(CheckValue("CurrentMode", actualValue, 7U)); } NextTest(); @@ -90777,7 +87301,7 @@ class TestSelfFabricRemoval : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1)); + VerifyOrReturn(CheckValue("CommissionedFabrics", actualValue, 1U)); } VerifyOrReturn(CheckConstraintType("commissionedFabrics", "", "uint8")); @@ -90802,7 +87326,7 @@ class TestSelfFabricRemoval : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentFabricIndex", "", "uint8")); - VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1)); + VerifyOrReturn(CheckConstraintMinValue("currentFabricIndex", [value unsignedCharValue], 1U)); { ourFabricIndex = value; } @@ -91443,14 +87967,14 @@ class TestBinding : public TestCommandBridge { { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPBindingClusterTargetStruct alloc] init]; - ((CHIPBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPBindingClusterTargetStruct alloc] init]; ((CHIPBindingClusterTargetStruct *) temp_0[1]).node = [NSNumber numberWithUnsignedLongLong:1ULL]; ((CHIPBindingClusterTargetStruct *) temp_0[1]).group = [NSNumber numberWithUnsignedShort:1U]; ((CHIPBindingClusterTargetStruct *) temp_0[1]).endpoint = [NSNumber numberWithUnsignedShort:1U]; ((CHIPBindingClusterTargetStruct *) temp_0[1]).cluster = [NSNumber numberWithUnsignedInt:6UL]; - ((CHIPBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; bindingArgument = temp_0; } @@ -91476,18 +88000,18 @@ class TestBinding : public TestCommandBridge { NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; temp_0[0] = [[CHIPBindingClusterTargetStruct alloc] init]; ((CHIPBindingClusterTargetStruct *) temp_0[0]).group = [NSNumber numberWithUnsignedShort:1U]; - ((CHIPBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[1] = [[CHIPBindingClusterTargetStruct alloc] init]; ((CHIPBindingClusterTargetStruct *) temp_0[1]).node = [NSNumber numberWithUnsignedLongLong:1ULL]; ((CHIPBindingClusterTargetStruct *) temp_0[1]).endpoint = [NSNumber numberWithUnsignedShort:1U]; ((CHIPBindingClusterTargetStruct *) temp_0[1]).cluster = [NSNumber numberWithUnsignedInt:6UL]; - ((CHIPBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPBindingClusterTargetStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; temp_0[2] = [[CHIPBindingClusterTargetStruct alloc] init]; ((CHIPBindingClusterTargetStruct *) temp_0[2]).node = [NSNumber numberWithUnsignedLongLong:2ULL]; ((CHIPBindingClusterTargetStruct *) temp_0[2]).endpoint = [NSNumber numberWithUnsignedShort:1U]; - ((CHIPBindingClusterTargetStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPBindingClusterTargetStruct *) temp_0[2]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; bindingArgument = temp_0; } @@ -91522,20 +88046,20 @@ class TestBinding : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); VerifyOrReturn(CheckValue("Group", ((CHIPBindingClusterTargetStruct *) actualValue[0]).group, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); VerifyOrReturn( CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); VerifyOrReturn( CheckValue("Cluster", ((CHIPBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); - VerifyOrReturn( - CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); VerifyOrReturn( CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); } NextTest(); @@ -91556,7 +88080,7 @@ class TestBinding : public TestCommandBridge { temp_0[0] = [[CHIPBindingClusterTargetStruct alloc] init]; ((CHIPBindingClusterTargetStruct *) temp_0[0]).node = [NSNumber numberWithUnsignedLongLong:3ULL]; ((CHIPBindingClusterTargetStruct *) temp_0[0]).endpoint = [NSNumber numberWithUnsignedShort:1U]; - ((CHIPBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0U]; bindingArgument = temp_0; } @@ -91593,8 +88117,8 @@ class TestBinding : public TestCommandBridge { VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[0]).node, 3ULL)); VerifyOrReturn( CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[0]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -91622,20 +88146,20 @@ class TestBinding : public TestCommandBridge { id actualValue = value; VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); VerifyOrReturn(CheckValue("Group", ((CHIPBindingClusterTargetStruct *) actualValue[0]).group, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); VerifyOrReturn( CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); VerifyOrReturn( CheckValue("Cluster", ((CHIPBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); - VerifyOrReturn( - CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1U)); VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); VerifyOrReturn( CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); - VerifyOrReturn( - CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1)); + VerifyOrReturn(CheckValue( + "FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1U)); } NextTest(); @@ -92094,7 +88618,7 @@ class TestArmFailSafe : public TestCommandBridge { { id actualValue = values.errorCode; - VerifyOrReturn(CheckValue("errorCode", actualValue, 0)); + VerifyOrReturn(CheckValue("errorCode", actualValue, 0U)); } NextTest(); @@ -92477,7 +89001,7 @@ class TestFanControl : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:3]; + fanModeArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeFanModeWithValue:fanModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write fan mode Error: %@", err); @@ -92503,7 +89027,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("fan mode", actualValue, 3)); + VerifyOrReturn(CheckValue("fan mode", actualValue, 3U)); } NextTest(); @@ -92519,7 +89043,7 @@ class TestFanControl : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeSequenceArgument; - fanModeSequenceArgument = [NSNumber numberWithUnsignedChar:5]; + fanModeSequenceArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeFanModeSequenceWithValue:fanModeSequenceArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write fan mode sequence Error: %@", err); @@ -92545,7 +89069,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("fan mode sequence", actualValue, 5)); + VerifyOrReturn(CheckValue("fan mode sequence", actualValue, 5U)); } NextTest(); @@ -92561,7 +89085,7 @@ class TestFanControl : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id percentSettingArgument; - percentSettingArgument = [NSNumber numberWithUnsignedChar:84]; + percentSettingArgument = [NSNumber numberWithUnsignedChar:84U]; [cluster writeAttributePercentSettingWithValue:percentSettingArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write percent setting Error: %@", err); @@ -92588,7 +89112,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 84)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 84U)); } NextTest(); @@ -92611,7 +89135,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 84)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 84U)); } NextTest(); @@ -92633,7 +89157,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("speed current", actualValue, 84)); + VerifyOrReturn(CheckValue("speed current", actualValue, 84U)); } NextTest(); @@ -92676,7 +89200,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 84)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 84U)); } NextTest(); @@ -92692,7 +89216,7 @@ class TestFanControl : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id speedSettingArgument; - speedSettingArgument = [NSNumber numberWithUnsignedChar:73]; + speedSettingArgument = [NSNumber numberWithUnsignedChar:73U]; [cluster writeAttributeSpeedSettingWithValue:speedSettingArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write speed setting Error: %@", err); @@ -92719,7 +89243,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 73)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 73U)); } NextTest(); @@ -92742,7 +89266,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 73)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 73U)); } NextTest(); @@ -92764,7 +89288,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("percent current", actualValue, 73)); + VerifyOrReturn(CheckValue("percent current", actualValue, 73U)); } NextTest(); @@ -92807,7 +89331,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 73)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 73U)); } NextTest(); @@ -92823,7 +89347,7 @@ class TestFanControl : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:0]; + fanModeArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeFanModeWithValue:fanModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write fan mode Error: %@", err); @@ -92850,7 +89374,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("percent setting", actualValue)); - VerifyOrReturn(CheckValue("percent setting", actualValue, 0)); + VerifyOrReturn(CheckValue("percent setting", actualValue, 0U)); } NextTest(); @@ -92872,7 +89396,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("percent current", actualValue, 0)); + VerifyOrReturn(CheckValue("percent current", actualValue, 0U)); } NextTest(); @@ -92895,7 +89419,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("speed setting", actualValue)); - VerifyOrReturn(CheckValue("speed setting", actualValue, 0)); + VerifyOrReturn(CheckValue("speed setting", actualValue, 0U)); } NextTest(); @@ -92917,7 +89441,7 @@ class TestFanControl : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("speed current", actualValue, 0)); + VerifyOrReturn(CheckValue("speed current", actualValue, 0U)); } NextTest(); @@ -92933,7 +89457,7 @@ class TestFanControl : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id fanModeArgument; - fanModeArgument = [NSNumber numberWithUnsignedChar:5]; + fanModeArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeFanModeWithValue:fanModeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"Write fan mode Error: %@", err); @@ -93462,11 +89986,11 @@ class TestMultiAdmin : public TestCommandBridge { } }; -class Test_TC_SWDIAG_1_1 : public TestCommandBridge { +class Test_TC_DGSW_2_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SWDIAG_1_1() - : TestCommandBridge("Test_TC_SWDIAG_1_1") + Test_TC_DGSW_2_1() + : TestCommandBridge("Test_TC_DGSW_2_1") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -93476,7 +90000,7 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SWDIAG_1_1() {} + ~Test_TC_DGSW_2_1() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -93484,11 +90008,11 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGSW_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGSW_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -93506,7 +90030,7 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Reads a list of ThreadMetrics struct non-global attribute from DUT.\n"); - if (ShouldSkip("A_THREADMETRICS")) { + if (ShouldSkip("DGSW.S.A0001")) { NextTest(); return; } @@ -93514,11 +90038,15 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads CurrentHeapFree non-global attribute value from DUT\n"); + if (ShouldSkip("DGSW.S.A0002")) { + NextTest(); + return; + } err = TestReadsCurrentHeapFreeNonGlobalAttributeValueFromDut_2(); break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapUsed non-global attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPUSED")) { + if (ShouldSkip("DGSW.S.A0003")) { NextTest(); return; } @@ -93526,7 +90054,7 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentHeapHighWaterMark non-global attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) { + if (ShouldSkip("DGSW.S.A0004")) { NextTest(); return; } @@ -93616,11 +90144,6 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { [cluster readAttributeCurrentHeapFreeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentHeapFree non-global attribute value from DUT Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHeapFree", "", "uint64")); @@ -93641,11 +90164,6 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { [cluster readAttributeCurrentHeapUsedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentHeapUsed non-global attribute value from DUT Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); @@ -93666,11 +90184,6 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { [cluster readAttributeCurrentHeapHighWatermarkWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentHeapHighWaterMark non-global attribute value from DUT Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); @@ -93681,11 +90194,11 @@ class Test_TC_SWDIAG_1_1 : public TestCommandBridge { } }; -class Test_TC_SWDIAG_2_1 : public TestCommandBridge { +class Test_TC_DGSW_2_2 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SWDIAG_2_1() - : TestCommandBridge("Test_TC_SWDIAG_2_1") + Test_TC_DGSW_2_2() + : TestCommandBridge("Test_TC_DGSW_2_2") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -93695,7 +90208,7 @@ class Test_TC_SWDIAG_2_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SWDIAG_2_1() {} + ~Test_TC_DGSW_2_2() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -93703,11 +90216,11 @@ class Test_TC_SWDIAG_2_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGSW_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGSW_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -93773,11 +90286,11 @@ class Test_TC_SWDIAG_2_1 : public TestCommandBridge { } }; -class Test_TC_SWDIAG_3_1 : public TestCommandBridge { +class Test_TC_DGSW_2_3 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_SWDIAG_3_1() - : TestCommandBridge("Test_TC_SWDIAG_3_1") + Test_TC_DGSW_2_3() + : TestCommandBridge("Test_TC_DGSW_2_3") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -93787,7 +90300,7 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_SWDIAG_3_1() {} + ~Test_TC_DGSW_2_3() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -93795,11 +90308,11 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DGSW_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DGSW_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -93817,7 +90330,7 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { break; case 1: ChipLogProgress(chipTool, " ***** Test Step 1 : Sends ResetWatermarks to DUT\n"); - if (ShouldSkip("CR_RESETWATERMARKS")) { + if (ShouldSkip("DGSW.S.C00")) { NextTest(); return; } @@ -93825,7 +90338,7 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads a list of ThreadMetrics struct attribute from DUT.\n"); - if (ShouldSkip("A_THREADMETRICS")) { + if (ShouldSkip("DGSW.S.A0001")) { NextTest(); return; } @@ -93833,7 +90346,7 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { break; case 3: ChipLogProgress(chipTool, " ***** Test Step 3 : Reads CurrentHeapUsed attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPUSED")) { + if (ShouldSkip("DGSW.S.A0003")) { NextTest(); return; } @@ -93841,7 +90354,7 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { break; case 4: ChipLogProgress(chipTool, " ***** Test Step 4 : Reads CurrentHeapHighWaterMark attribute value from DUT\n"); - if (ShouldSkip("A_CURRENTHEAPHIGHWATERMARK")) { + if (ShouldSkip("DGSW.S.A0004")) { NextTest(); return; } @@ -93950,11 +90463,6 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { [cluster readAttributeCurrentHeapUsedWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentHeapUsed attribute value from DUT Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHeapUsed", "", "uint64")); @@ -93975,11 +90483,6 @@ class Test_TC_SWDIAG_3_1 : public TestCommandBridge { [cluster readAttributeCurrentHeapHighWatermarkWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { NSLog(@"Reads CurrentHeapHighWaterMark attribute value from DUT Error: %@", err); - if (err.code == MatterInteractionErrorCodeUnsupportedAttribute) { - NextTest(); - return; - } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("currentHeapHighWatermark", "", "uint64")); @@ -95299,7 +91802,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = nil; params.userUniqueId = nil; @@ -95351,19 +91854,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -95374,13 +91877,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -95401,7 +91904,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = nil; params.userUniqueId = nil; @@ -95426,7 +91929,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = @"new_user"; params.userUniqueId = nil; @@ -95478,19 +91981,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -95501,13 +92004,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -95528,7 +92031,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = nil; params.userUniqueId = [NSNumber numberWithUnsignedInt:305441741UL]; @@ -95581,19 +92084,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -95604,13 +92107,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -95631,11 +92134,11 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = nil; params.userUniqueId = nil; - params.userStatus = [NSNumber numberWithUnsignedChar:3]; + params.userStatus = [NSNumber numberWithUnsignedChar:3U]; params.userType = nil; params.credentialRule = nil; [cluster setUserWithParams:params @@ -95684,19 +92187,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 3)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -95707,13 +92210,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -95734,12 +92237,12 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = nil; params.userUniqueId = nil; params.userStatus = nil; - params.userType = [NSNumber numberWithUnsignedChar:6]; + params.userType = [NSNumber numberWithUnsignedChar:6U]; params.credentialRule = nil; [cluster setUserWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -95787,19 +92290,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 3)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 6)); + VerifyOrReturn(CheckValue("userType", actualValue, 6U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -95810,13 +92313,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -95837,13 +92340,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = nil; params.userUniqueId = nil; params.userStatus = nil; params.userType = nil; - params.credentialRule = [NSNumber numberWithUnsignedChar:2]; + params.credentialRule = [NSNumber numberWithUnsignedChar:2U]; [cluster setUserWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Modify credentialRule for existing user Error: %@", err); @@ -95890,19 +92393,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 3)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 3U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 6)); + VerifyOrReturn(CheckValue("userType", actualValue, 6U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 2)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 2U)); } { @@ -95913,13 +92416,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -95940,13 +92443,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = @"test_user"; params.userUniqueId = [NSNumber numberWithUnsignedInt:466460832UL]; - params.userStatus = [NSNumber numberWithUnsignedChar:1]; - params.userType = [NSNumber numberWithUnsignedChar:0]; - params.credentialRule = [NSNumber numberWithUnsignedChar:1]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:1U]; [cluster setUserWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Modify all fields for existing user Error: %@", err); @@ -95993,19 +92496,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 1)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 1U)); } { @@ -96016,13 +92519,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -96043,13 +92546,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.userName = @"test_user2"; params.userUniqueId = [NSNumber numberWithUnsignedInt:12648430UL]; - params.userStatus = [NSNumber numberWithUnsignedChar:1]; - params.userType = [NSNumber numberWithUnsignedChar:1]; - params.credentialRule = [NSNumber numberWithUnsignedChar:2]; + params.userStatus = [NSNumber numberWithUnsignedChar:1U]; + params.userType = [NSNumber numberWithUnsignedChar:1U]; + params.credentialRule = [NSNumber numberWithUnsignedChar:2U]; [cluster setUserWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Add another user with non-default fields Error: %@", err); @@ -96096,19 +92599,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 1)); + VerifyOrReturn(CheckValue("userType", actualValue, 1U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 2)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 2U)); } { @@ -96119,13 +92622,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -96146,7 +92649,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NumberOfTotalUsersSupported copy]; params.userName = @"last_user"; params.userUniqueId = nil; @@ -96198,19 +92701,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -96221,13 +92724,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -96248,7 +92751,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; params.userName = nil; params.userUniqueId = nil; @@ -96273,7 +92776,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; params.userName = nil; params.userUniqueId = nil; @@ -96389,7 +92892,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userName = nil; params.userUniqueId = nil; @@ -96441,19 +92944,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -96464,13 +92967,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -96718,7 +93221,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params @@ -96767,7 +93270,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params @@ -96790,7 +93293,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfPINUsersSupported unsignedShortValue] + 1U]; @@ -96813,9 +93316,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"000000" length:6]; @@ -96831,7 +93334,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -96885,19 +93388,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -96905,7 +93408,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); VerifyOrReturn(CheckValue( "CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); } @@ -96913,13 +93416,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -96941,7 +93444,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params @@ -96965,13 +93468,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -96992,9 +93495,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -97010,7 +93513,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97037,9 +93540,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfPINUsersSupported unsignedShortValue] + 1U]; @@ -97056,7 +93559,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97110,7 +93613,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params @@ -97133,7 +93636,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfRFIDUsersSupported unsignedShortValue] + 1U]; @@ -97157,7 +93660,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params @@ -97205,9 +93708,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; params.credentialData = [[NSData alloc] initWithBytes:"rfid_data_123456" length:16]; @@ -97223,7 +93726,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -97276,19 +93779,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -97296,11 +93799,11 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(2))); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); VerifyOrReturn(CheckValue( "CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); VerifyOrReturn(CheckValue( "CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); } @@ -97308,13 +93811,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -97336,7 +93839,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params @@ -97360,13 +93863,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -97387,9 +93890,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; params.credentialData = [[NSData alloc] initWithBytes:"new_rfid_data_field" length:19]; @@ -97405,7 +93908,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97432,9 +93935,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfRFIDUsersSupported unsignedShortValue] + 1U]; @@ -97451,7 +93954,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97477,9 +93980,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"123465" length:6]; @@ -97495,7 +93998,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97522,9 +94025,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"123465" length:6]; @@ -97540,7 +94043,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97567,9 +94070,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"12345" length:5]; @@ -97585,7 +94088,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97612,9 +94115,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"123456789" length:9]; @@ -97630,7 +94133,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97657,9 +94160,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"rfid_data" length:9]; @@ -97675,7 +94178,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97702,15 +94205,15 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; params.userStatus = nil; - params.userType = [NSNumber numberWithUnsignedChar:3]; + params.userType = [NSNumber numberWithUnsignedChar:3U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -97720,7 +94223,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97747,9 +94250,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"very_long_rfid_data_to_test_boundaries" length:38]; @@ -97765,7 +94268,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -97792,9 +94295,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; params.credentialData = [[NSData alloc] initWithBytes:"000000" length:6]; @@ -97810,7 +94313,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2)); + VerifyOrReturn(CheckValue("status", actualValue, 2U)); } { @@ -97837,9 +94340,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; params.credentialData = [[NSData alloc] initWithBytes:"rfid_data_123456" length:16]; @@ -97855,7 +94358,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2)); + VerifyOrReturn(CheckValue("status", actualValue, 2U)); } { @@ -97882,9 +94385,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -97900,7 +94403,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -97927,9 +94430,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"000000" length:6]; @@ -97945,7 +94448,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -97973,9 +94476,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -97991,7 +94494,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 2)); + VerifyOrReturn(CheckValue("status", actualValue, 2U)); } { @@ -98018,9 +94521,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; params.credentialData = [[NSData alloc] initWithBytes:"rfid_data_7890" length:14]; @@ -98036,7 +94539,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -98090,19 +94593,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -98110,15 +94613,15 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); } @@ -98126,13 +94629,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -98154,9 +94657,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:5U]; params.credentialData = [[NSData alloc] initWithBytes:"789012" length:6]; @@ -98172,7 +94675,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -98226,19 +94729,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -98246,19 +94749,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(4))); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 1U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 2U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 2U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 4U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[3]).credentialType, 1)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[3]).credentialType, 1U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[3]).credentialIndex, 5U)); } @@ -98266,13 +94769,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -98295,7 +94798,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params @@ -98318,7 +94821,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params @@ -98394,19 +94897,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -98414,15 +94917,15 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(3))); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 2)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 2U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 2U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialType, 2U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[1]).credentialIndex, 4U)); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 1)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialType, 1U)); VerifyOrReturn( CheckValue("CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[2]).credentialIndex, 5U)); } @@ -98430,13 +94933,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -98459,7 +94962,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster clearCredentialWithParams:params @@ -98482,7 +94985,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; [cluster getCredentialStatusWithParams:params @@ -98601,9 +95104,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"rfid_data_12345" length:15]; @@ -98619,7 +95122,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -98648,7 +95151,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearCredentialWithParams:params @@ -98671,7 +95174,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params @@ -98721,7 +95224,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params @@ -98771,7 +95274,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; [cluster getCredentialStatusWithParams:params @@ -98846,19 +95349,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -98866,7 +95369,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 1U)); VerifyOrReturn(CheckValue( "CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 5U)); } @@ -98874,13 +95377,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -98971,9 +95474,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -98989,7 +95492,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -99017,9 +95520,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; params.credentialData = [[NSData alloc] initWithBytes:"rfid_data_1234" length:14]; @@ -99035,7 +95538,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -99063,9 +95566,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:6U]; params.credentialData = [[NSData alloc] initWithBytes:"rfid_data_9876" length:14]; @@ -99081,7 +95584,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -99130,7 +95633,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params @@ -99179,7 +95682,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getCredentialStatusWithParams:params @@ -99228,7 +95731,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:6U]; [cluster getCredentialStatusWithParams:params @@ -99556,9 +96059,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -99574,7 +96077,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } { @@ -99600,9 +96103,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -99618,7 +96121,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -99671,19 +96174,19 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.userStatus; VerifyOrReturn(CheckValueNonNull("userStatus", actualValue)); - VerifyOrReturn(CheckValue("userStatus", actualValue, 1)); + VerifyOrReturn(CheckValue("userStatus", actualValue, 1U)); } { id actualValue = values.userType; VerifyOrReturn(CheckValueNonNull("userType", actualValue)); - VerifyOrReturn(CheckValue("userType", actualValue, 0)); + VerifyOrReturn(CheckValue("userType", actualValue, 0U)); } { id actualValue = values.credentialRule; VerifyOrReturn(CheckValueNonNull("credentialRule", actualValue)); - VerifyOrReturn(CheckValue("credentialRule", actualValue, 0)); + VerifyOrReturn(CheckValue("credentialRule", actualValue, 0U)); } { @@ -99691,7 +96194,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturn(CheckValueNonNull("credentials", actualValue)); VerifyOrReturn(CheckValue("credentials", [actualValue count], static_cast(1))); VerifyOrReturn( - CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 0)); + CheckValue("CredentialType", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialType, 0U)); VerifyOrReturn(CheckValue( "CredentialIndex", ((CHIPDoorLockClusterDlCredential *) actualValue[0]).credentialIndex, 0U)); } @@ -99699,13 +96202,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -99727,7 +96230,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params @@ -99751,13 +96254,13 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.creatorFabricIndex; VerifyOrReturn(CheckValueNonNull("creatorFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("creatorFabricIndex", actualValue, 1U)); } { id actualValue = values.lastModifiedFabricIndex; VerifyOrReturn(CheckValueNonNull("lastModifiedFabricIndex", actualValue)); - VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("lastModifiedFabricIndex", actualValue, 1U)); } { @@ -99778,9 +96281,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; params.credentialData = [[NSData alloc] initWithBytes:"654321" length:6]; @@ -99796,7 +96299,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -99823,7 +96326,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster clearCredentialWithParams:params @@ -99845,7 +96348,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params @@ -99867,7 +96370,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster clearCredentialWithParams:params @@ -99889,7 +96392,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfPINUsersSupported unsignedShortValue] + 1U]; @@ -99912,7 +96415,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster clearCredentialWithParams:params @@ -99934,7 +96437,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:[NumberOfRFIDUsersSupported unsignedShortValue] + 1U]; @@ -100047,7 +96550,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:0U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getCredentialStatusWithParams:params @@ -100095,9 +96598,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"000000" length:6]; @@ -100113,7 +96616,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -100141,9 +96644,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; params.credentialData = [[NSData alloc] initWithBytes:"000001" length:6]; @@ -100159,7 +96662,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -100186,9 +96689,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"000002" length:6]; @@ -100204,7 +96707,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -100231,9 +96734,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:4U]; params.credentialData = [[NSData alloc] initWithBytes:"000003" length:6]; @@ -100249,7 +96752,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -100276,9 +96779,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:5U]; params.credentialData = [[NSData alloc] initWithBytes:"000004" length:6]; @@ -100294,7 +96797,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -100321,9 +96824,9 @@ class DL_UsersAndCredentials : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:6U]; params.credentialData = [[NSData alloc] initWithBytes:"000005" length:6]; @@ -100339,7 +96842,7 @@ class DL_UsersAndCredentials : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 137)); + VerifyOrReturn(CheckValue("status", actualValue, 137U)); } { @@ -100594,7 +97097,7 @@ class DL_LockUnlock : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 2)); + VerifyOrReturn(CheckValue("LockState", actualValue, 2U)); } NextTest(); @@ -100636,7 +97139,7 @@ class DL_LockUnlock : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 1)); + VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); } NextTest(); @@ -100652,9 +97155,9 @@ class DL_LockUnlock : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -100670,7 +97173,7 @@ class DL_LockUnlock : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -100724,7 +97227,7 @@ class DL_LockUnlock : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 1)); + VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); } NextTest(); @@ -100767,7 +97270,7 @@ class DL_LockUnlock : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 2)); + VerifyOrReturn(CheckValue("LockState", actualValue, 2U)); } NextTest(); @@ -100809,7 +97312,7 @@ class DL_LockUnlock : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 2)); + VerifyOrReturn(CheckValue("LockState", actualValue, 2U)); } NextTest(); @@ -100852,7 +97355,7 @@ class DL_LockUnlock : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 1)); + VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); } NextTest(); @@ -100869,7 +97372,7 @@ class DL_LockUnlock : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params @@ -101865,9 +98368,9 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -101883,7 +98386,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -101946,7 +98449,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfWeekDaySchedulesSupportedPerUser", actualValue, 10)); + VerifyOrReturn(CheckValue("NumberOfWeekDaySchedulesSupportedPerUser", actualValue, 10U)); } { NumberOfWeekDaySchedulesSupportedPerUser = value; @@ -101973,7 +98476,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfYearDaySchedulesSupportedPerUser", actualValue, 10)); + VerifyOrReturn(CheckValue("NumberOfYearDaySchedulesSupportedPerUser", actualValue, 10U)); } { NumberOfYearDaySchedulesSupportedPerUser = value; @@ -102000,7 +98503,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfHolidaySchedulesSupported", actualValue, 10)); + VerifyOrReturn(CheckValue("NumberOfHolidaySchedulesSupported", actualValue, 10U)); } { NumberOfHolidaySchedulesSupported = value; @@ -102019,13 +98522,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with 0 index Error: %@", err); @@ -102044,13 +98547,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with out-of-bounds index Error: %@", err); @@ -102069,13 +98572,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with 0 user index Error: %@", err); @@ -102094,13 +98597,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with out-of-bounds user index Error: %@", err); @@ -102119,13 +98622,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule for non-existing user Error: %@", err); @@ -102144,13 +98647,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:0]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:0U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with 0 days mask Error: %@", err); @@ -102169,13 +98672,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:3]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:3U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule for Sunday and Monday Error: %@", err); @@ -102194,13 +98697,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:73]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:73U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule for Sunday Wednesday and Saturday Error: %@", err); @@ -102219,13 +98722,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:24]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:24U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with invalid start hour Error: %@", err); @@ -102244,13 +98747,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:60]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:60U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with invalid start minute Error: %@", err); @@ -102269,13 +98772,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:24]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:24U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with invalid end hour Error: %@", err); @@ -102294,13 +98797,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:60]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:60U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with invalid end minute Error: %@", err); @@ -102319,13 +98822,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:19]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:19U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with start hour later that end hour Error: %@", err); @@ -102344,13 +98847,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:50]; - params.endHour = [NSNumber numberWithUnsignedChar:15]; - params.endMinute = [NSNumber numberWithUnsignedChar:49]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:50U]; + params.endHour = [NSNumber numberWithUnsignedChar:15U]; + params.endMinute = [NSNumber numberWithUnsignedChar:49U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -102371,7 +98874,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -102382,7 +98885,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -102392,7 +98895,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -102408,7 +98911,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -102419,7 +98922,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); } { @@ -102429,7 +98932,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102445,7 +98948,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -102457,7 +98960,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; VerifyOrReturn(CheckValue("weekDayIndex", actualValue, - [NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1)); + [NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U)); } { @@ -102467,7 +98970,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102483,7 +98986,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -102494,7 +98997,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -102504,7 +99007,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102520,7 +99023,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -102531,7 +99034,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -102542,7 +99045,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102558,7 +99061,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -102569,7 +99072,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -102579,7 +99082,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -102595,7 +99098,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; @@ -102617,7 +99120,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; @@ -102639,7 +99142,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; @@ -102661,7 +99164,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; @@ -102683,7 +99186,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; @@ -102705,7 +99208,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345688UL]; @@ -102727,7 +99230,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -102738,7 +99241,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -102748,7 +99251,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -102764,7 +99267,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -102775,7 +99278,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 0)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 0U)); } { @@ -102785,7 +99288,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102801,7 +99304,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -102813,7 +99316,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; VerifyOrReturn(CheckValue("yearDayIndex", actualValue, - [NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1)); + [NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U)); } { @@ -102823,7 +99326,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102839,7 +99342,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -102850,7 +99353,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -102860,7 +99363,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102876,7 +99379,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -102887,7 +99390,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -102898,7 +99401,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -102914,7 +99417,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -102925,7 +99428,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -102935,7 +99438,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -102951,10 +99454,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:0]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:0U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Holiday schedule with 0 index Error: %@", err); @@ -102973,10 +99476,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Holiday schedule with out-of-bounds index Error: %@", err); @@ -102995,10 +99498,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345689UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345688UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Holiday schedule with start hour later that end hour Error: %@", err); @@ -103017,10 +99520,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:5]; + params.operatingMode = [NSNumber numberWithUnsignedChar:5U]; [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Holiday schedule with invalid operating mode Error: %@", err); @@ -103039,7 +99542,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -103049,12 +99552,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -103070,7 +99573,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:0]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:0U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -103080,12 +99583,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 0)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 0U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -103101,7 +99604,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfHolidaySchedulesSupported unsignedCharValue] + 1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -103112,12 +99615,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; VerifyOrReturn(CheckValue( - "holidayIndex", actualValue, [NumberOfHolidaySchedulesSupported unsignedCharValue] + 1)); + "holidayIndex", actualValue, [NumberOfHolidaySchedulesSupported unsignedCharValue] + 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } NextTest(); @@ -103133,10 +99636,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:0]; + params.operatingMode = [NSNumber numberWithUnsignedChar:0U]; [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Holiday schedule with valid parameters Error: %@", err); @@ -103156,7 +99659,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -103166,12 +99669,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -103186,7 +99689,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); } NextTest(); @@ -103202,13 +99705,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:16]; - params.endHour = [NSNumber numberWithUnsignedChar:18]; - params.endMinute = [NSNumber numberWithUnsignedChar:0]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:16U]; + params.endHour = [NSNumber numberWithUnsignedChar:18U]; + params.endMinute = [NSNumber numberWithUnsignedChar:0U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with valid parameters Error: %@", err); @@ -103228,7 +99731,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -103239,7 +99742,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -103249,32 +99752,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15)); + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18)); + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); } NextTest(); @@ -103290,7 +99793,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:12345UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:12345689UL]; @@ -103313,7 +99816,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -103324,7 +99827,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -103334,7 +99837,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -103360,7 +99863,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103380,7 +99883,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfWeekDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103400,7 +99903,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103420,7 +99923,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103440,7 +99943,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103460,7 +99963,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -103471,7 +99974,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -103481,32 +99984,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15)); + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18)); + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); } NextTest(); @@ -103522,7 +100025,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -103533,7 +100036,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -103543,7 +100046,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -103569,7 +100072,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -103579,12 +100082,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -103599,7 +100102,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); } NextTest(); @@ -103615,7 +100118,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103635,7 +100138,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103655,7 +100158,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:0U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103675,7 +100178,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:[NumberOfTotalUsersSupported unsignedShortValue] + 1U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103695,7 +100198,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -103715,7 +100218,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -103726,7 +100229,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -103736,32 +100239,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15)); + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18)); + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); } NextTest(); @@ -103777,7 +100280,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -103788,7 +100291,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -103798,7 +100301,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -103824,7 +100327,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -103834,12 +100337,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -103854,7 +100357,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); } NextTest(); @@ -103870,7 +100373,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:0]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:0U]; [cluster clearHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Clear Holiday schedule with 0 index Error: %@", err); @@ -103889,7 +100392,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:[NumberOfYearDaySchedulesSupportedPerUser unsignedCharValue] + 1U]; [cluster clearHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Clear Holiday schedule with out-of-bounds index Error: %@", err); @@ -103908,7 +100411,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -103919,7 +100422,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -103929,32 +100432,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 15)); + VerifyOrReturn(CheckValue("startHour", actualValue, 15U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 16)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 16U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 18)); + VerifyOrReturn(CheckValue("endHour", actualValue, 18U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 0U)); } NextTest(); @@ -103970,7 +100473,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -103981,7 +100484,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -103991,7 +100494,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104017,7 +100520,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -104027,12 +100530,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104047,7 +100550,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); } NextTest(); @@ -104063,13 +100566,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:2]; - params.startHour = [NSNumber numberWithUnsignedChar:0]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; + params.daysMask = [NSNumber numberWithUnsignedChar:2U]; + params.startHour = [NSNumber numberWithUnsignedChar:0U]; + params.startMinute = [NSNumber numberWithUnsignedChar:0U]; + params.endHour = [NSNumber numberWithUnsignedChar:23U]; + params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); @@ -104089,7 +100592,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -104100,7 +100603,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); } { @@ -104110,32 +100613,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 2)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); } NextTest(); @@ -104151,7 +100654,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; @@ -104174,7 +100677,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -104185,7 +100688,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); } { @@ -104195,7 +100698,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104221,10 +100724,10 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; params.localStartTime = [NSNumber numberWithUnsignedInt:123456UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:1234567UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:1]; + params.operatingMode = [NSNumber numberWithUnsignedChar:1U]; [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create another Holiday schedule with valid parameters Error: %@", err); @@ -104244,7 +100747,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -104254,12 +100757,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104274,7 +100777,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 1)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); } NextTest(); @@ -104290,7 +100793,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -104311,7 +100814,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -104322,7 +100825,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -104332,7 +100835,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -104348,7 +100851,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:254]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -104369,7 +100872,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -104380,7 +100883,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); } { @@ -104390,7 +100893,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -104406,7 +100909,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -104417,7 +100920,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -104427,7 +100930,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104453,7 +100956,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -104464,7 +100967,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); } { @@ -104474,7 +100977,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104500,7 +101003,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -104510,12 +101013,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104530,7 +101033,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); } NextTest(); @@ -104546,7 +101049,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -104556,12 +101059,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -104576,7 +101079,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 1)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); } NextTest(); @@ -104592,13 +101095,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:2]; - params.startHour = [NSNumber numberWithUnsignedChar:0]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; + params.daysMask = [NSNumber numberWithUnsignedChar:2U]; + params.startHour = [NSNumber numberWithUnsignedChar:0U]; + params.startMinute = [NSNumber numberWithUnsignedChar:0U]; + params.endHour = [NSNumber numberWithUnsignedChar:23U]; + params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create another Week Day schedule with valid parameters Error: %@", err); @@ -104618,7 +101121,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -104639,7 +101142,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -104650,7 +101153,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -104660,7 +101163,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -104676,7 +101179,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:254]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearYearDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -104697,7 +101200,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -104708,7 +101211,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); } { @@ -104718,7 +101221,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -104734,7 +101237,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -104745,7 +101248,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -104755,32 +101258,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 2)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 2U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); } NextTest(); @@ -104796,7 +101299,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:254]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -104817,7 +101320,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetUserParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.userName = nil; params.userUniqueId = nil; @@ -104843,13 +101346,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:0]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:0U]; + params.startMinute = [NSNumber numberWithUnsignedChar:0U]; + params.endHour = [NSNumber numberWithUnsignedChar:23U]; + params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with valid parameters for first user Error: %@", err); @@ -104869,7 +101372,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -104880,7 +101383,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -104890,32 +101393,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); } NextTest(); @@ -104931,7 +101434,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; @@ -104954,7 +101457,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -104965,7 +101468,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4U)); } { @@ -104975,7 +101478,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105001,13 +101504,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.daysMask = [NSNumber numberWithUnsignedChar:64]; - params.startHour = [NSNumber numberWithUnsignedChar:23]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; + params.daysMask = [NSNumber numberWithUnsignedChar:64U]; + params.startHour = [NSNumber numberWithUnsignedChar:23U]; + params.startMinute = [NSNumber numberWithUnsignedChar:0U]; + params.endHour = [NSNumber numberWithUnsignedChar:23U]; + params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule with valid parameters for second user Error: %@", err); @@ -105027,7 +101530,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -105038,7 +101541,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4U)); } { @@ -105048,32 +101551,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 64)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 64U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 23)); + VerifyOrReturn(CheckValue("startHour", actualValue, 23U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); } NextTest(); @@ -105089,7 +101592,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:55555UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:7777777UL]; @@ -105112,7 +101615,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -105123,7 +101626,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -105133,7 +101636,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105179,7 +101682,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -105190,7 +101693,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -105200,7 +101703,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105216,7 +101719,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -105227,7 +101730,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 4U)); } { @@ -105237,7 +101740,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105253,7 +101756,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:4]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:4U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -105264,7 +101767,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 4U)); } { @@ -105274,7 +101777,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105290,7 +101793,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -105301,7 +101804,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -105311,7 +101814,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105327,7 +101830,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -105337,12 +101840,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105357,7 +101860,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); } NextTest(); @@ -105373,7 +101876,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -105383,12 +101886,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105403,7 +101906,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 1)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 1U)); } NextTest(); @@ -105422,7 +101925,7 @@ class DL_Schedules : public TestCommandBridge { params.holidayIndex = [NumberOfHolidaySchedulesSupported copy]; params.localStartTime = [NSNumber numberWithUnsignedInt:1UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:100UL]; - params.operatingMode = [NSNumber numberWithUnsignedChar:4]; + params.operatingMode = [NSNumber numberWithUnsignedChar:4U]; [cluster setHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create another Holiday schedule at the last slot Error: %@", err); @@ -105457,7 +101960,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105472,7 +101975,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 4)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 4U)); } NextTest(); @@ -105488,9 +101991,9 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -105506,7 +102009,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105534,13 +102037,13 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:1]; - params.startHour = [NSNumber numberWithUnsignedChar:0]; - params.startMinute = [NSNumber numberWithUnsignedChar:0]; - params.endHour = [NSNumber numberWithUnsignedChar:23]; - params.endMinute = [NSNumber numberWithUnsignedChar:59]; + params.daysMask = [NSNumber numberWithUnsignedChar:1U]; + params.startHour = [NSNumber numberWithUnsignedChar:0U]; + params.startMinute = [NSNumber numberWithUnsignedChar:0U]; + params.endHour = [NSNumber numberWithUnsignedChar:23U]; + params.endMinute = [NSNumber numberWithUnsignedChar:59U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Create Week Day schedule for first user Error: %@", err); @@ -105560,7 +102063,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:9000UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:888888888UL]; @@ -105583,7 +102086,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster clearHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Clear a single holiday schedule Error: %@", err); @@ -105603,7 +102106,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -105613,12 +102116,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105633,7 +102136,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 0)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 0U)); } NextTest(); @@ -105649,7 +102152,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -105659,12 +102162,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105695,7 +102198,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105710,7 +102213,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.operatingMode; - VerifyOrReturn(CheckValue("operatingMode", actualValue, 4)); + VerifyOrReturn(CheckValue("operatingMode", actualValue, 4U)); } NextTest(); @@ -105726,7 +102229,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -105737,7 +102240,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -105747,32 +102250,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); } NextTest(); @@ -105788,7 +102291,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -105799,7 +102302,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -105809,7 +102312,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -105835,7 +102338,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:254]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:254U]; [cluster clearHolidayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Clear all remaining holiday schedules Error: %@", err); @@ -105855,7 +102358,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:1]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:1U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -105865,12 +102368,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 1U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105886,7 +102389,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.holidayIndex = [NSNumber numberWithUnsignedChar:2]; + params.holidayIndex = [NSNumber numberWithUnsignedChar:2U]; [cluster getHolidayScheduleWithParams:params completionHandler:^( CHIPDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, NSError * _Nullable err) { @@ -105896,12 +102399,12 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.holidayIndex; - VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("holidayIndex", actualValue, 2U)); } { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105932,7 +102435,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } NextTest(); @@ -105948,7 +102451,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -105959,7 +102462,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 1U)); } { @@ -105969,32 +102472,32 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { id actualValue = values.daysMask; - VerifyOrReturn(CheckValue("daysMask", actualValue, 1)); + VerifyOrReturn(CheckValue("daysMask", actualValue, 1U)); } { id actualValue = values.startHour; - VerifyOrReturn(CheckValue("startHour", actualValue, 0)); + VerifyOrReturn(CheckValue("startHour", actualValue, 0U)); } { id actualValue = values.startMinute; - VerifyOrReturn(CheckValue("startMinute", actualValue, 0)); + VerifyOrReturn(CheckValue("startMinute", actualValue, 0U)); } { id actualValue = values.endHour; - VerifyOrReturn(CheckValue("endHour", actualValue, 23)); + VerifyOrReturn(CheckValue("endHour", actualValue, 23U)); } { id actualValue = values.endMinute; - VerifyOrReturn(CheckValue("endMinute", actualValue, 59)); + VerifyOrReturn(CheckValue("endMinute", actualValue, 59U)); } NextTest(); @@ -106010,7 +102513,7 @@ class DL_Schedules : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -106021,7 +102524,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 1U)); } { @@ -106031,7 +102534,7 @@ class DL_Schedules : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -106332,9 +102835,9 @@ class Test_TC_DL_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -106350,7 +102853,7 @@ class Test_TC_DL_2_2 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -106417,7 +102920,7 @@ class Test_TC_DL_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id wrongCodeEntryLimitArgument; - wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3]; + wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument completionHandler:^(NSError * _Nullable err) { @@ -106438,7 +102941,7 @@ class Test_TC_DL_2_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); id userCodeTemporaryDisableTimeArgument; - userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:5]; + userCodeTemporaryDisableTimeArgument = [NSNumber numberWithUnsignedChar:5U]; [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 5 seconds " @@ -106543,7 +103046,7 @@ class Test_TC_DL_2_2 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("UserCodeTemporaryDisableTime", actualValue, 5)); + VerifyOrReturn(CheckValue("UserCodeTemporaryDisableTime", actualValue, 5U)); } NextTest(); @@ -106580,7 +103083,7 @@ class Test_TC_DL_2_2 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params @@ -106742,9 +103245,9 @@ class Test_TC_DL_2_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -106760,7 +103263,7 @@ class Test_TC_DL_2_3 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -106884,7 +103387,7 @@ class Test_TC_DL_2_3 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 1)); + VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); } NextTest(); @@ -106901,7 +103404,7 @@ class Test_TC_DL_2_3 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params @@ -107056,9 +103559,9 @@ class Test_TC_DL_2_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -107074,7 +103577,7 @@ class Test_TC_DL_2_4 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -107199,7 +103702,7 @@ class Test_TC_DL_2_4 : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValueNonNull("LockState", actualValue)); - VerifyOrReturn(CheckValue("LockState", actualValue, 1)); + VerifyOrReturn(CheckValue("LockState", actualValue, 1U)); } NextTest(); @@ -107364,9 +103867,9 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -107382,7 +103885,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -107418,7 +103921,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfWeekDaySchedulesSupportedPerUser", actualValue, 10)); + VerifyOrReturn(CheckValue("NumberOfWeekDaySchedulesSupportedPerUser", actualValue, 10U)); } { NumberOfWeekDaySchedulesSupportedPerUser = value; @@ -107464,13 +103967,13 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:2]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:45]; - params.endHour = [NSNumber numberWithUnsignedChar:16]; - params.endMinute = [NSNumber numberWithUnsignedChar:55]; + params.daysMask = [NSNumber numberWithUnsignedChar:2U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:45U]; + params.endHour = [NSNumber numberWithUnsignedChar:16U]; + params.endMinute = [NSNumber numberWithUnsignedChar:55U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog(@"Send Set Week Day Schedule Command to DUT Error: %@", err); @@ -107490,7 +103993,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params @@ -107501,55 +104004,57 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn( - CheckConstraintMinValue("weekDayIndex", [values.weekDayIndex unsignedCharValue], 1)); + CheckConstraintMinValue("weekDayIndex", [values.weekDayIndex unsignedCharValue], 1U)); VerifyOrReturn( CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, true)); if (values.daysMask != nil) { - VerifyOrReturn(CheckConstraintMinValue("daysMask", [values.daysMask unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("daysMask", [values.daysMask unsignedCharValue], 6)); + VerifyOrReturn( + CheckConstraintMinValue("daysMask", [values.daysMask unsignedCharValue], 0U)); + VerifyOrReturn( + CheckConstraintMaxValue("daysMask", [values.daysMask unsignedCharValue], 6U)); } VerifyOrReturn(CheckConstraintHasValue("startHour", values.startHour, true)); if (values.startHour != nil) { VerifyOrReturn( - CheckConstraintMinValue("startHour", [values.startHour unsignedCharValue], 0)); + CheckConstraintMinValue("startHour", [values.startHour unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("startHour", [values.startHour unsignedCharValue], 23)); + CheckConstraintMaxValue("startHour", [values.startHour unsignedCharValue], 23U)); } VerifyOrReturn(CheckConstraintHasValue("startMinute", values.startMinute, true)); if (values.startMinute != nil) { VerifyOrReturn( - CheckConstraintMinValue("startMinute", [values.startMinute unsignedCharValue], 0)); + CheckConstraintMinValue("startMinute", [values.startMinute unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("startMinute", [values.startMinute unsignedCharValue], 59)); + CheckConstraintMaxValue("startMinute", [values.startMinute unsignedCharValue], 59U)); } VerifyOrReturn(CheckConstraintHasValue("endHour", values.endHour, true)); if (values.endHour != nil) { - VerifyOrReturn(CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 0)); - VerifyOrReturn(CheckConstraintMaxValue("endHour", [values.endHour unsignedCharValue], 23)); + VerifyOrReturn(CheckConstraintMinValue("endHour", [values.endHour unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("endHour", [values.endHour unsignedCharValue], 23U)); } VerifyOrReturn(CheckConstraintHasValue("endMinute", values.endMinute, true)); if (values.endMinute != nil) { VerifyOrReturn( - CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 0)); + CheckConstraintMinValue("endMinute", [values.endMinute unsignedCharValue], 0U)); VerifyOrReturn( - CheckConstraintMaxValue("endMinute", [values.endMinute unsignedCharValue], 59)); + CheckConstraintMaxValue("endMinute", [values.endMinute unsignedCharValue], 59U)); } NextTest(); @@ -107565,13 +104070,13 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.daysMask = [NSNumber numberWithUnsignedChar:7]; - params.startHour = [NSNumber numberWithUnsignedChar:15]; - params.startMinute = [NSNumber numberWithUnsignedChar:45]; - params.endHour = [NSNumber numberWithUnsignedChar:16]; - params.endMinute = [NSNumber numberWithUnsignedChar:55]; + params.daysMask = [NSNumber numberWithUnsignedChar:7U]; + params.startHour = [NSNumber numberWithUnsignedChar:15U]; + params.startMinute = [NSNumber numberWithUnsignedChar:45U]; + params.endHour = [NSNumber numberWithUnsignedChar:16U]; + params.endMinute = [NSNumber numberWithUnsignedChar:55U]; [cluster setWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -107591,7 +104096,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params @@ -107603,7 +104108,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 0U)); } { @@ -107613,7 +104118,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); @@ -107649,7 +104154,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:254]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:254U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearWeekDayScheduleWithParams:params completionHandler:^(NSError * _Nullable err) { @@ -107670,7 +104175,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getWeekDayScheduleWithParams:params completionHandler:^( @@ -107681,7 +104186,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { { id actualValue = values.weekDayIndex; - VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("weekDayIndex", actualValue, 2U)); } { @@ -107691,7 +104196,7 @@ class Test_TC_DL_2_5 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } VerifyOrReturn(CheckConstraintHasValue("daysMask", values.daysMask, false)); @@ -107899,9 +104404,9 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; @@ -107917,7 +104422,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -107945,9 +104450,9 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; params.credentialData = [[NSData alloc] initWithBytes:"123457" length:6]; @@ -107963,7 +104468,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -107999,7 +104504,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = value; - VerifyOrReturn(CheckValue("NumberOfYearDaySchedulesSupportedPerUser", actualValue, 10)); + VerifyOrReturn(CheckValue("NumberOfYearDaySchedulesSupportedPerUser", actualValue, 10U)); } { NumberOfYearDaySchedulesSupportedPerUser = value; @@ -108045,7 +104550,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.localStartTime = [NSNumber numberWithUnsignedInt:10UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:20UL]; @@ -108068,7 +104573,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:1]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:1U]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -108078,14 +104583,14 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn( - CheckConstraintMinValue("yearDayIndex", [values.yearDayIndex unsignedCharValue], 1)); + CheckConstraintMinValue("yearDayIndex", [values.yearDayIndex unsignedCharValue], 1U)); VerifyOrReturn( CheckConstraintMinValue("userIndex", [values.userIndex unsignedShortValue], 1U)); { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, true)); @@ -108113,7 +104618,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:0]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:0U]; params.userIndex = [NSNumber numberWithUnsignedShort:10U]; params.localStartTime = [NSNumber numberWithUnsignedInt:30UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:10UL]; @@ -108136,7 +104641,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:21U]; [cluster getYearDayScheduleWithParams:params @@ -108148,7 +104653,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); } { @@ -108158,7 +104663,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 133)); + VerifyOrReturn(CheckValue("status", actualValue, 133U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); @@ -108182,7 +104687,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:10]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:10U]; params.userIndex = [NSNumber numberWithUnsignedShort:5U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -108193,7 +104698,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 10)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 10U)); } { @@ -108203,7 +104708,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); @@ -108227,7 +104732,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -108238,7 +104743,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); } { @@ -108248,7 +104753,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } VerifyOrReturn(CheckConstraintHasValue("localStartTime", values.localStartTime, false)); @@ -108272,7 +104777,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; params.localStartTime = [NSNumber numberWithUnsignedInt:10UL]; params.localEndTime = [NSNumber numberWithUnsignedInt:20UL]; @@ -108295,7 +104800,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:2]; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:2U]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster getYearDayScheduleWithParams:params completionHandler:^( @@ -108306,7 +104811,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.yearDayIndex; - VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2)); + VerifyOrReturn(CheckValue("yearDayIndex", actualValue, 2U)); } { @@ -108316,7 +104821,7 @@ class Test_TC_DL_2_7 : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -108566,15 +105071,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108596,7 +105101,7 @@ class Test_TC_DL_2_9 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params @@ -108626,15 +105131,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"1234" length:4]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userStatus = [NSNumber numberWithUnsignedChar:5]; - params.userType = [NSNumber numberWithUnsignedChar:10]; + params.userStatus = [NSNumber numberWithUnsignedChar:5U]; + params.userType = [NSNumber numberWithUnsignedChar:10U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108655,15 +105160,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108684,15 +105189,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108713,15 +105218,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108742,15 +105247,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:2]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:3U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108772,7 +105277,7 @@ class Test_TC_DL_2_9 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearCredentialWithParams:params @@ -108794,15 +105299,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108824,7 +105329,7 @@ class Test_TC_DL_2_9 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearCredentialWithParams:params @@ -108846,15 +105351,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108876,7 +105381,7 @@ class Test_TC_DL_2_9 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:65534U]; [cluster clearCredentialWithParams:params @@ -108899,7 +105404,7 @@ class Test_TC_DL_2_9 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterGetCredentialStatusParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster getCredentialStatusWithParams:params @@ -108927,15 +105432,15 @@ class Test_TC_DL_2_9 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[CHIPDoorLockClusterSetCredentialParams alloc] init]; - params.operationType = [NSNumber numberWithUnsignedChar:0]; + params.operationType = [NSNumber numberWithUnsignedChar:0U]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:2U]; - params.userStatus = [NSNumber numberWithUnsignedChar:0]; - params.userType = [NSNumber numberWithUnsignedChar:0]; + params.userStatus = [NSNumber numberWithUnsignedChar:0U]; + params.userType = [NSNumber numberWithUnsignedChar:0U]; [cluster setCredentialWithParams:params completionHandler:^(CHIPDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { @@ -108957,7 +105462,7 @@ class Test_TC_DL_2_9 : public TestCommandBridge { __auto_type * params = [[CHIPDoorLockClusterClearCredentialParams alloc] init]; params.credential = [[CHIPDoorLockClusterDlCredential alloc] init]; - ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:8]; + ((CHIPDoorLockClusterDlCredential *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:8U]; ((CHIPDoorLockClusterDlCredential *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:2U]; [cluster clearCredentialWithParams:params @@ -109197,7 +105702,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 135)); + VerifyOrReturn(CheckValue("status", actualValue, 135U)); } { @@ -109227,7 +105732,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109258,7 +105763,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -109288,7 +105793,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -109323,7 +105828,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109388,7 +105893,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109418,7 +105923,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -109453,7 +105958,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 135)); + VerifyOrReturn(CheckValue("status", actualValue, 135U)); } { @@ -109483,7 +105988,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109513,7 +106018,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -109548,7 +106053,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109634,7 +106139,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109664,7 +106169,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109694,7 +106199,7 @@ class TestGroupsCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 139)); + VerifyOrReturn(CheckValue("status", actualValue, 139U)); } { @@ -109859,12 +106364,16 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestRemoveAll_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : KeySet Remove 2\n"); - err = TestKeySetRemove2_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Read GroupTable 3\n"); + err = TestReadGroupTable3_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : KeySet Remove 2\n"); + err = TestKeySetRemove2_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_20(); break; } @@ -109935,6 +106444,9 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { 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), EMBER_ZCL_STATUS_NOT_FOUND)); break; } @@ -109950,7 +106462,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 20; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -110026,7 +106538,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -110057,7 +106569,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -110084,7 +106596,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:0]; + [NSNumber numberWithUnsignedChar:0U]; ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257" length:16]; ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = @@ -110123,7 +106635,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:1]; + [NSNumber numberWithUnsignedChar:1U]; ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = [[NSData alloc] initWithBytes:"\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337" length:16]; ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = @@ -110172,7 +106684,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue( "GroupKeySetID", ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 417U)); VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0)); + ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); VerifyOrReturn( CheckValueNull("EpochKey0", ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); VerifyOrReturn(CheckValueNonNull( @@ -110213,7 +106725,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { temp_0[0] = [[CHIPGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:0U]; - ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; groupKeyMapArgument = temp_0; } @@ -110242,12 +106754,12 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { temp_0[0] = [[CHIPGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:257U]; ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:417U]; - ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; temp_0[1] = [[CHIPGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupId = [NSNumber numberWithUnsignedShort:258U]; ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).groupKeySetID = [NSNumber numberWithUnsignedShort:418U]; - ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; groupKeyMapArgument = temp_0; } @@ -110288,13 +106800,13 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue("GroupKeySetID", ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).groupKeySetID, 417U)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, 1)); + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue("GroupId", ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupId, 258U)); VerifyOrReturn(CheckValue("GroupKeySetID", ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).groupKeySetID, 418U)); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, 1)); + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) actualValue[1]).fabricIndex, 1U)); } NextTest(); @@ -110328,14 +106840,14 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, @"Group #1")); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, 1)); + ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, 1U)); VerifyOrReturn(CheckValue("GroupId", ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupId, 258U)); VerifyOrReturn(CheckValueAsString("GroupName", ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).groupName, @"Group #2")); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, 1)); + ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[1]).fabricIndex, 1U)); } NextTest(); @@ -110411,7 +106923,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { VerifyOrReturn(CheckValue( "GroupKeySetID", ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 418U)); VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", - ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 1)); + ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 1U)); VerifyOrReturn( CheckValueNull("EpochKey0", ((CHIPGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); VerifyOrReturn(CheckValueNonNull( @@ -110454,7 +106966,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { { id actualValue = values.status; - VerifyOrReturn(CheckValue("status", actualValue, 0)); + VerifyOrReturn(CheckValue("status", actualValue, 0U)); } { @@ -110493,7 +107005,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, @"Group #2")); VerifyOrReturn(CheckValue("FabricIndex", - ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, 1)); + ((CHIPGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).fabricIndex, 1U)); } NextTest(); @@ -110519,7 +107031,34 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_18() + CHIP_ERROR TestReadGroupTable3_18() + { + CHIPDevice * device = GetDevice("alpha"); + CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster readAttributeGroupTableWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read GroupTable 3 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestKeySetRemove2_19() { CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -110541,7 +107080,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_19() + CHIP_ERROR TestKeySetReadAlsoRemoved_20() { CHIPDevice * device = GetDevice("alpha"); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -110601,9 +107140,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -110675,7 +107211,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -110701,6 +107236,8 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -110750,9 +107287,9 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), - make_unique(), - make_unique(), + make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(),