From 486940577dfb0cb2db858be8ca76f411eccc362c Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:08:28 +0530 Subject: [PATCH] Modified scripts Aug 10 (#21800) * Modified scripts TC-ACT-1.1 TC-ALOGIN-1.12 TC-APBSC-1.10 TC-APPLAUNCHER-1.3 TC-AUDIOOUTPUT-1.8 TC-BOOL-1.1 TC-CADMIN-1.* TC-CC-1.1 TC-CC-2.1 TC-CC-3.* TC-CC-4.* TC-CC-5.* TC-CC-6.* TC-CC-7.* TC-CC-8.* TC-CC-9.* TC-MOD-1.1 TC-FLW-1.1 TC-DESC-1.1 TC-DGEN-1.1 TC-I-1.1 TC-ILL-1.1 TC-OO-1.1 TC-PS-1.1 TC-PSCFG-1.1 TC-TGNAV-1.1 TC-TSTAT-1.1 TC-TSUIC-1.1 TC-WAKEONLAN-1.1 TC-WNCV-1.1 * Restyled by prettier-yaml * Auto generated files * Modified tests TC-CADMIN-1.3 TC-CADMIN-1.5 TC-CADMIN-1.9 TC-CADMIN-1.13 TC-CADMIN-1.23 TC-CADMIN-1.24 TC-CC-6.2 TC-CC-6.3 TC-CC-8.1 * Auto generated files * Modified CC-4.1 and CC-7.2 * Auto generated files * Modified CC-7.2 * Auto generated files * Modified scripts CC-7.2 and LVL-4.1 * Auto generated files Co-authored-by: Restyled.io --- .../certification/Test_TC_CADMIN_1_13.yaml | 14 +- .../certification/Test_TC_CADMIN_1_23.yaml | 7 + .../certification/Test_TC_CADMIN_1_24.yaml | 15 +- .../certification/Test_TC_CADMIN_1_3.yaml | 12 +- .../certification/Test_TC_CADMIN_1_5.yaml | 17 +- .../certification/Test_TC_CADMIN_1_9.yaml | 7 +- .../suites/certification/Test_TC_CC_4_1.yaml | 68 +- .../suites/certification/Test_TC_CC_6_2.yaml | 568 ++-- .../suites/certification/Test_TC_CC_6_3.yaml | 314 ++- .../suites/certification/Test_TC_CC_7_2.yaml | 49 +- .../suites/certification/Test_TC_CC_8_1.yaml | 461 ++-- .../suites/certification/Test_TC_LVL_4_1.yaml | 4 +- .../chip-tool/zap-generated/test/Commands.h | 1955 +++++++------- .../zap-generated/test/Commands.h | 2281 ++++++----------- 14 files changed, 2711 insertions(+), 3061 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 2eb6abdd14ad11..6cccfd249fdc0b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -39,6 +39,10 @@ config: payload: type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" + PakeVerifier: + type: octet_string + defaultValue: + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" @@ -142,7 +146,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: 3840 - name: "iterations" @@ -188,7 +192,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: 3840 - name: "iterations" @@ -207,7 +211,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: 3840 - name: "iterations" @@ -253,7 +257,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: 3840 - name: "iterations" @@ -272,7 +276,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: 3840 - name: "iterations" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index dfded257848895..7699fe7a503487 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml @@ -24,6 +24,9 @@ config: nodeId: 0x12344321 timeout: 330 endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 tests: - label: "Factory Reset the DUT_CE" @@ -62,6 +65,8 @@ tests: values: - name: "CommissioningTimeout" value: 180 + - name: "discriminator" + value: discriminator - label: "Wait for commissioning Window to 301 seconds" cluster: "DelayCommands" @@ -89,6 +94,8 @@ tests: values: - name: "CommissioningTimeout" value: 179 + - name: "discriminator" + value: discriminator response: error: INVALID_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml index 2c1872a917de08..7f846e4ff9c50d 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml @@ -24,6 +24,13 @@ config: nodeId: 0x12344321 timeout: 330 endpoint: 0 + discriminator: + type: int16u + defaultValue: 3840 + PakeVerifier: + type: octet_string + defaultValue: + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" tests: - label: "Factory Reset the DUT_CE" @@ -63,9 +70,9 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" @@ -98,9 +105,9 @@ tests: - name: "CommissioningTimeout" value: 179 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" - value: 3840 + value: discriminator - name: "iterations" value: 1000 - name: "salt" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index ec7483aee424eb..6e9533fbae4a4a 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml @@ -29,7 +29,11 @@ config: defaultValue: 3840 payload: type: char_string - defaultValue: "MT:0000000000I31506010" # This value needs to be generated automatically + defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically + PakeVerifier: + type: octet_string + defaultValue: + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" @@ -51,7 +55,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -185,7 +189,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -221,7 +225,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml index 84bd1c34c59a9c..7704d791ccc636 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml @@ -38,6 +38,13 @@ config: payload: type: char_string defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically + PakeVerifier: + type: octet_string + defaultValue: + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf" + IncorrectPakeVerifier: + type: octet_string + defaultValue: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" @@ -59,7 +66,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -99,7 +106,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -163,7 +170,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a" + value: IncorrectPakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -183,7 +190,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -201,7 +208,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml index 922f65a58e1665..dbd0b0a06b3f71 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml @@ -41,6 +41,9 @@ config: incorrectSetupCodePayload: type: char_string defaultValue: "MT:-24J0AFN00I.0648G00" + PakeVerifier: + type: octet_string + defaultValue: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" tests: - label: "TH_CR1 starts a commissioning process with DUT_CE" @@ -64,7 +67,7 @@ tests: - name: "CommissioningTimeout" value: 900 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -127,7 +130,7 @@ tests: - name: "CommissioningTimeout" value: 900 - name: "PAKEVerifier" - value: "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml index 2a15655ec09676..aeeff8a6582a60 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml @@ -94,7 +94,73 @@ tests: response: value: SaturationConfigValue constraints: - type: int8u + minValue: 68 + maxValue: 92 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 80 + maxValue: 115 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 110 + maxValue: 120 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 120 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 maxValue: 254 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml index 255bf0002ba998..21969627a8f916 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml @@ -84,340 +84,310 @@ tests: minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue - - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Up" - PICS: CC.S.F04 && CC.S.C4B.Rsp - command: "MoveColorTemperature" + - label: + "TH sends MoveToColorTemperature command to DUT with + ColorTemperatureMireds=(ColorTempPhysicalMinMireds + + ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 (immediately)." + PICS: CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-to-color-temperature 32639 0 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666592.559286][9065:9070] CHIP:DMG: StatusIB = + [1649666592.559322][9065:9070] CHIP:DMG: { + [1649666592.559357][9065:9070] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666592.559391][9065:9070] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "MoveMode" - value: 1 - - name: "Rate" - value: 20 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 + (up), Rate = (ColorTempPhysicalMaxMireds - + ColorTempPhysicalMinMireds)/40" + PICS: CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-color-temperature 1 16319 0 65279 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666643.381403][9085:9090] CHIP:DMG: StatusIB = + [1649666643.381465][9085:9090] CHIP:DMG: { + [1649666643.381530][9085:9090] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666643.381582][9085:9090] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666635.306093][9078:9083] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087364802 + [1649666635.306184][9078:9083] CHIP:TOO: ColorTemperature: 16000 (value can vary) + [1649666635.306298][9078:9083] CHIP:EM: Sending Standalone Ack for MessageCounter:2077197 on exchange 1795i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666635.306093][9078:9083] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087364802 + [1649666635.306184][9078:9083] CHIP:TOO: ColorTemperature: 16500 (value can vary) + [1649666635.306298][9078:9083] CHIP:EM: Sending Standalone Ack for MessageCounter:2077197 on exchange 1795i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Down" - PICS: CC.S.F04 && CC.S.C4B.Rsp - command: "MoveColorTemperature" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After another 5 seconds, TH reads ColorTemperatureMireds attribute + from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666635.306093][9078:9083] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087364802 + [1649666635.306184][9078:9083] CHIP:TOO: ColorTemperature: 16500 (value can vary) + [1649666635.306298][9078:9083] CHIP:EM: Sending Standalone Ack for MessageCounter:2077197 on exchange 1795i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "MoveMode" - value: 3 - - name: "Rate" - value: 20 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH sends MoveColorTemperature command to DUT with MoveMode = + 0x03(down), Rate = (ColorTempPhysicalMaxMireds - + ColorTempPhysicalMinMireds)/20" + PICS: CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-color-temperature 3 32369 0 65279 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666643.381403][9085:9090] CHIP:DMG: StatusIB = + [1649666643.381465][9085:9090] CHIP:DMG: { + [1649666643.381530][9085:9090] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666643.381582][9085:9090] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666665.611446][9091:9096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087365394 + [1649666665.611577][9091:9096] CHIP:TOO: ColorTemperature: 15500 (value can vary) + [1649666665.611685][9091:9096] CHIP:EM: Sending Standalone Ack for MessageCounter:8367884 on exchange 32174i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666665.611446][9091:9096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087365394 + [1649666665.611577][9091:9096] CHIP:TOO: ColorTemperature: 14000 (value can vary) + [1649666665.611685][9091:9096] CHIP:EM: Sending Standalone Ack for MessageCounter:8367884 on exchange 32174i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Up" - PICS: CC.S.F04 && CC.S.C4B.Rsp - command: "MoveColorTemperature" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After another 5 seconds, TH reads ColorTemperatureMireds attribute + from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666665.611446][9091:9096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087365394 + [1649666665.611577][9091:9096] CHIP:TOO: ColorTemperature: 14000 (value can vary) + [1649666665.611685][9091:9096] CHIP:EM: Sending Standalone Ack for MessageCounter:8367884 on exchange 32174i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "MoveMode" - value: 1 - - name: "Rate" - value: 20 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Stop" - PICS: CC.S.F04 && CC.S.C4B.Rsp - command: "MoveColorTemperature" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH sends MoveColorTemperature command to DUT with MoveMode = + 0x01(up), Rate = (ColorTempPhysicalMaxMireds - + ColorTempPhysicalMinMireds)/20" + PICS: CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-color-temperature 1 32369 0 65279 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666683.278957][9097:9102] CHIP:DMG: StatusIB = + [1649666683.279020][9097:9102] CHIP:DMG: { + [1649666683.279087][9097:9102] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666683.279146][9097:9102] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "MoveMode" - value: 0 - - name: "Rate" - value: 20 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After 10 seconds, TH sends MoveColorTemperature command to DUT with + MoveMode = 0x00(stop), Rate = (ColorTempPhysicalMaxMireds - + ColorTempPhysicalMinMireds)/20" + PICS: CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-color-temperature 0 32369 0 65279 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666683.278957][9097:9102] CHIP:DMG: StatusIB = + [1649666683.279020][9097:9102] CHIP:DMG: { + [1649666683.279087][9097:9102] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666683.279146][9097:9102] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - saveAs: ColorTemperatureValue - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - value: ColorTemperatureValue - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - value: ColorTemperatureValue - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Down" - PICS: CC.S.F04 && CC.S.C4B.Rsp - command: "MoveColorTemperature" - arguments: - values: - - name: "MoveMode" - value: 3 - - name: "Rate" - value: 20 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Stop" - PICS: CC.S.F04 && CC.S.C4B.Rsp - command: "MoveColorTemperature" + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666800.459923][9128:9133] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087368020 + [1649666800.460008][9128:9133] CHIP:TOO: ColorTemperature: 12500 (value can vary) + [1649666800.460160][9128:9133] CHIP:EM: Sending Standalone Ack for MessageCounter:363494 on exchange 55194i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "MoveMode" - value: 0 - - name: "Rate" - value: 20 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "After another 2 seconds, TH reads ColorTemperatureMireds attribute + from DUT" + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666800.459923][9128:9133] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087368020 + [1649666800.460008][9128:9133] CHIP:TOO: ColorTemperature: 12500 (value can very) + [1649666800.460160][9128:9133] CHIP:EM: Sending Standalone Ack for MessageCounter:363494 on exchange 55194i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - saveAs: ColorTemperatureMoveModeStop - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "TH reads ColorMode attribute from DUT." + PICS: CC.S.F04 && CC.S.A0008 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-mode 1 1 + + Verify in TH(chip-tool) Log: + [1659712688.315752][5086:5091] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0008 DataVersion: 468119348 + [1659712688.315831][5086:5091] CHIP:TOO: ColorMode: 2 + [1659712688.315957][5086:5091] CHIP:EM: Sending Standalone Ack for MessageCounter:240585607 on exchange 4537i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - value: ColorTemperatureMoveModeStop - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "TH reads EnhancedColorMode attribute from DUT." + PICS: CC.S.F04 && CC.S.A4001 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read enhanced-color-mode 1 1 + + Verify in TH(chip-tool) Log: + [1659712734.529238][5094:5099] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4001 DataVersion: 468119348 + [1659712734.529360][5094:5099] CHIP:TOO: EnhancedColorMode: 2 + [1659712734.529552][5094:5099] CHIP:EM: Sending Standalone Ack for MessageCounter:39175367 on exchange 3560i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 - - - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - value: ColorTemperatureValue - constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - label: "Turn off light that we turned on" PICS: OO.S.C00.Rsp cluster: "On/Off" - command: "off" + command: "Off" - label: "Check on/off attribute value is false after off command" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml index 172daf51049dc3..07d50da61c63b7 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml @@ -84,158 +84,228 @@ tests: minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue - - label: "TH sends StepColorTemperature command to DUT with MoveMode = Up" - PICS: CC.S.F04 && CC.S.C4C.Rsp - command: "StepColorTemperature" + - label: + "TH sends MoveToColorTemperature command to DUT with + ColorTemperatureMireds=(ColorTempPhysicalMinMireds + + ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 (immediately)." + PICS: CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-to-color-temperature 32639 0 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666592.559286][9065:9070] CHIP:DMG: StatusIB = + [1649666592.559322][9065:9070] CHIP:DMG: { + [1649666592.559357][9065:9070] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666592.559391][9065:9070] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "StepMode" - value: 1 - - name: "StepSize" - value: 100 - - name: "TransitionTime" - value: 15 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "Wait 500ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH sends StepColorTemperature command to DUT with StepMode = 0x01 + (up), StepSize = (ColorTempPhysicalMaxMireds - + ColorTempPhysicalMinMireds)/2 and TransitionTime = 200 (20s)." + PICS: CC.S.F04 && CC.S.C4c.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol step-color-temperature 1 32639 200 0 65279 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649667424.918523][9183:9188] CHIP:DMG: StatusIB = + [1649667424.918601][9183:9188] CHIP:DMG: { + [1649667424.918678][9183:9188] CHIP:DMG: status = 0x00 (SUCCESS), + [1649667424.918741][9183:9188] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 500 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 - - label: "Wait 500ms" - cluster: "DelayCommands" - command: "WaitForMs" + Verify in TH(chip-tool) Log: + [1649667419.577304][9177:9182] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087380060 + [1649667419.577405][9177:9182] CHIP:TOO: ColorTemperature: 22000 (value can vary) + [1649667419.577532][9177:9182] CHIP:EM: Sending Standalone Ack for MessageCounter:15518191 on exchange 14182i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 500 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 - - label: "Wait 700ms" - cluster: "DelayCommands" - command: "WaitForMs" + Verify in TH(chip-tool) Log: + [1649667419.577304][9177:9182] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087380060 + [1649667419.577405][9177:9182] CHIP:TOO: ColorTemperature: 25000 (value can vary) + [1649667419.577532][9177:9182] CHIP:EM: Sending Standalone Ack for MessageCounter:15518191 on exchange 14182i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 700 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "After another 5 seconds, TH reads ColorTemperatureMireds attribute + from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 - - label: "TH sends StepColorTemperature command to DUT with MoveMode = Down" - PICS: CC.S.F04 && CC.S.C4C.Rsp - command: "StepColorTemperature" + Verify in TH(chip-tool) Log: + [1649667419.577304][9177:9182] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087380060 + [1649667419.577405][9177:9182] CHIP:TOO: ColorTemperature: 25000 (value can vary) + [1649667419.577532][9177:9182] CHIP:EM: Sending Standalone Ack for MessageCounter:15518191 on exchange 14182i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "StepMode" - value: 3 - - name: "StepSize" - value: 100 - - name: "TransitionTime" - value: 10 - - name: "ColorTemperatureMinimumMireds" - value: ColorTempPhysicalMinMiredsValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTempPhysicalMaxMiredsValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "Wait 500ms" - cluster: "DelayCommands" - command: "WaitForMs" + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: + "TH sends StepColorTemperature command to DUT with StepMode = 0x03 + (down), StepSize = (ColorTempPhysicalMaxMireds - + ColorTempPhysicalMinMireds) and TransitionTime = 200 (20s)." + PICS: CC.S.F04 && CC.S.C4c.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol step-color-temperature 3 65279 200 0 65279 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649667424.918523][9183:9188] CHIP:DMG: StatusIB = + [1649667424.918601][9183:9188] CHIP:DMG: { + [1649667424.918678][9183:9188] CHIP:DMG: status = 0x00 (SUCCESS), + [1649667424.918741][9183:9188] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 500 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 - - label: "Wait 500ms" - cluster: "DelayCommands" - command: "WaitForMs" + Verify in TH(chip-tool) Log: + [1649667431.007143][9189:9194] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087380282 + [1649667431.007227][9189:9194] CHIP:TOO: ColorTemperature: 55000 (value can vary) + [1649667431.007331][9189:9194] CHIP:EM: Sending Standalone Ack for MessageCounter:16519125 on exchange 51144i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 500 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 - - label: "Wait 500ms" - cluster: "DelayCommands" - command: "WaitForMs" + Verify in TH(chip-tool) Log: + [1649667431.007143][9189:9194] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087380282 + [1649667431.007227][9189:9194] CHIP:TOO: ColorTemperature: 52300 (value can vary) + [1649667431.007331][9189:9194] CHIP:EM: Sending Standalone Ack for MessageCounter:16519125 on exchange 51144i + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 500 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "After another 5 seconds, TH reads ColorTemperatureMireds attribute + from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649667479.607750][9202:9207] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087381226 + [1649667479.607822][9202:9207] CHIP:TOO: ColorTemperature: 52300 (value can vary) + [1649667479.607915][9202:9207] CHIP:EM: Sending Standalone Ack for MessageCounter:10286581 on exchange 17774i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "TH reads ColorMode attribute from DUT." + PICS: CC.S.F04 && CC.S.A0008 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-mode 1 1 + + Verify in TH(chip-tool) Log: + [1659712688.315752][5086:5091] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0008 DataVersion: 468119348 + [1659712688.315831][5086:5091] CHIP:TOO: ColorMode: 2 + [1659712688.315957][5086:5091] CHIP:EM: Sending Standalone Ack for MessageCounter:240585607 on exchange 4537i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "TH reads EnhancedColorMode attribute from DUT." + PICS: CC.S.F04 && CC.S.A4001 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read enhanced-color-mode 1 1 + + Verify in TH(chip-tool) Log: + [1659712734.529238][5094:5099] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_4001 DataVersion: 468119348 + [1659712734.529360][5094:5099] CHIP:TOO: EnhancedColorMode: 2 + [1659712734.529552][5094:5099] CHIP:EM: Sending Standalone Ack for MessageCounter:39175367 on exchange 3560i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "Turn off light that we turned on" + - label: "Turn Off light that we turned on" PICS: OO.S.C00.Rsp cluster: "On/Off" - command: "off" + command: "Off" - label: "Check on/off attribute value is false after off command" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml index d9983803999b83..cac2d87a56b11a 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml @@ -153,9 +153,8 @@ tests: response: saveAs: EnhancedCurrentHueStep3b constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 34000 + maxValue: 36500 - label: "Wait 1000ms" cluster: "DelayCommands" @@ -172,9 +171,34 @@ tests: response: value: EnhancedCurrentHueStep3b constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 34500 + maxValue: 36500 + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" + arguments: + values: + - name: "EnhancedHue" + value: 25000 + - name: "Direction" + value: 0 + - name: "TransitionTime" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Down" PICS: CC.S.F01 && CC.S.C41.Rsp @@ -265,9 +289,8 @@ tests: response: saveAs: EnhancedCurrentHueStep5b constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 7500 + maxValue: 12500 - label: "Wait 1000ms" cluster: "DelayCommands" @@ -279,6 +302,14 @@ tests: - label: "TH reads EnhancedCurrentHue attribute from DUT several times." PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + attribute: "EnhancedCurrentHue" + response: + constraints: + minValue: 7500 + maxValue: 12500 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 command: "readAttribute" attribute: "EnhancedCurrentHue" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index 680dec2a3097d5..48000cd533c82a 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.19. [TC-CC-8.1] StopMoveStep functionality with server as DUT +name: 25.3.23. [TC-CC-8.1] StopMoveStep functionality with server as DUT PICS: - CC.S @@ -21,21 +21,6 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - RateConfigValue: - type: int8u - defaultValue: 50 - RateXConfigValue: - type: int16s - defaultValue: 50 - RateYConfigValue: - type: int16s - defaultValue: 50 - ColorTemperatureMinMiredsConfigValue: - type: int16u - defaultValue: 1 - ColorTemperatureMaxMiredsConfigValue: - type: int16u - defaultValue: 255 tests: - label: "Wait for the commissioned device to be retrieved" @@ -46,19 +31,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Turn on light for color control tests" - PICS: OO.S.C01.Rsp - cluster: "On/Off" - command: "on" - - - label: "Check on/off attribute value is true after on command" - cluster: "On/Off" - command: "readAttribute" - attribute: "OnOff" - PICS: OO.S.A0000 - response: - value: 1 - - label: "TH writes 0 to the Options attribute" PICS: CC.S.A000f command: "writeAttribute" @@ -66,7 +38,40 @@ tests: arguments: value: 0 - - label: "TH sends MoveHue command to DUT" + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + + - label: + "TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 + (shortest distance) and TransitionTime=0 (immediately)." + PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" + arguments: + values: + - name: "hue" + value: 200 + - name: "Direction" + value: 0 + - name: "TransitionTime" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: + "TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 + (units/s)" PICS: CC.S.C01.Rsp && CC.S.F00 command: "MoveHue" arguments: @@ -74,21 +79,19 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00 - command: "readAttribute" - attribute: "CurrentHue" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 - label: "TH sends StopMoveStep command to DUT" PICS: CC.S.C47.Rsp && CC.S.F00 @@ -101,80 +104,47 @@ tests: value: 0 - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00 + PICS: CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: - saveAs: CurrentHueValue constraints: - type: int8u - minValue: 0 + minValue: 235 maxValue: 254 - - label: "Wait 100ms" + - label: "Wait 2s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 100 + value: 2000 - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00 + PICS: CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00 command: "readAttribute" attribute: "CurrentHue" response: - value: CurrentHueValue constraints: - type: int8u - minValue: 0 + minValue: 240 maxValue: 254 - - label: "TH sends MoveSaturation command to DUT" - PICS: CC.S.C04.Rsp && CC.S.F00 - command: "MoveSaturation" + - label: + "TH sends MoveToSaturation command to DUT with Saturation=150 and + TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C03.Rsp + command: "MoveToSaturation" arguments: values: - - name: "MoveMode" - value: 1 - - name: "Rate" - value: RateConfigValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" + - name: "Saturation" + value: 150 + - name: "TransitionTime" value: 0 - - - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp && CC.S.F00 - command: "StopMoveStep" - arguments: - values: - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "TH reads CurrentSaturation attribute from DUT" - command: "readAttribute" - PICS: CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00 - attribute: "CurrentSaturation" - response: - saveAs: CurrentSaturationValue - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - label: "Wait 100ms" cluster: "DelayCommands" command: "WaitForMs" @@ -183,61 +153,32 @@ tests: - name: "ms" value: 100 - - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - value: CurrentSaturationValue - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: "TH sends MoveColor command to DUT" - PICS: CC.S.C08.Rsp && CC.S.F03 - command: "MoveColor" + - label: + "TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and + Rate=5 (units/s)" + command: "MoveSaturation" + PICS: CC.S.F00 && CC.S.C04.Rsp arguments: values: - - name: "rateX" - value: RateXConfigValue - - name: "rateY" - value: RateYConfigValue + - name: "MoveMode" + value: 1 + - name: "Rate" + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 - - - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03 - command: "readAttribute" - attribute: "CurrentX" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 - - - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03 - command: "readAttribute" - attribute: "CurrentY" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + value: 10000 - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp && CC.S.F03 + PICS: CC.S.C47.Rsp && CC.S.F00 command: "StopMoveStep" arguments: values: @@ -246,162 +187,207 @@ tests: - name: "OptionsOverride" value: 0 - - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03 + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" - attribute: "CurrentX" + attribute: "CurrentSaturation" response: - saveAs: CurrentXValue + saveAs: CurrentSaturationValue constraints: - type: int16u - minValue: 0 - maxValue: 65279 + minValue: 170 + maxValue: 230 - - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03 - command: "readAttribute" - attribute: "CurrentY" - response: - saveAs: CurrentYValue - constraints: - type: int16u - minValue: 0 - maxValue: 65279 - - - label: "Wait 1000ms" + - label: "Wait 2s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 2000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: CurrentSaturationValue + maxValue: 230 - - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03 + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" + PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" - attribute: "CurrentX" + attribute: "ColorTempPhysicalMinMireds" response: - value: CurrentXValue + saveAs: ColorTempPhysicalMinMireds constraints: type: int16u minValue: 0 maxValue: 65279 - - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03 + - label: "TH reads ColorTempPhysicalMaxMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A400c command: "readAttribute" - attribute: "CurrentY" + attribute: "ColorTempPhysicalMaxMireds" response: - value: CurrentYValue + saveAs: ColorTempPhysicalMaxMireds constraints: type: int16u minValue: 0 maxValue: 65279 - - label: "TH sends MoveColorTemperature command to DUT" - PICS: CC.S.C4B.Rsp && CC.S.F04 - command: "MoveColorTemperature" + - label: + "TH sends MoveToColorTemperature command to DUT with + ColorTemperatureMireds= ColorTempPhysicalMaxMireds / 2 and + TransitionTime=0 (immediately)." + PICS: CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-to-color-temperature 32639 0 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666592.559286][9065:9070] CHIP:DMG: StatusIB = + [1649666592.559322][9065:9070] CHIP:DMG: { + [1649666592.559357][9065:9070] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666592.559391][9065:9070] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "MoveMode" - value: 1 - - name: "Rate" - value: RateConfigValue - - name: "ColorTemperatureMinimumMireds" - value: ColorTemperatureMinMiredsConfigValue - - name: "ColorTemperatureMaximumMireds" - value: ColorTemperatureMaxMiredsConfigValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" + - label: + "TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 + (up), Rate = ColorTempPhysicalMaxMireds / 40" + PICS: CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol move-color-temperature 1 16319 0 65279 0 0 1 1 + + Verify in TH(chip-tool) Log: + [1649666643.381403][9085:9090] CHIP:DMG: StatusIB = + [1649666643.381465][9085:9090] CHIP:DMG: { + [1649666643.381530][9085:9090] CHIP:DMG: status = 0x00 (SUCCESS), + [1649666643.381582][9085:9090] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" arguments: values: - - name: "ms" - value: 1000 + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "After 10 seconds, TH sends StopMoveStep command to DUT." + PICS: CC.S.F04 && CC.S.C47.Rsp && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol stop-move-step 0 0 1 1 + + Verify in TH(chip-tool) log: + StatusIB = + [1652253588.380407][14229:14234] CHIP:DMG: { + [1652253588.380489][14229:14234] CHIP:DMG: status = 0x00 (SUCCESS), + [1652253588.380573][14229:14234] CHIP:DMG: }, + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" + + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666635.306093][9078:9083] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087364802 + [1649666635.306184][9078:9083] CHIP:TOO: ColorTemperature: 16000 (value can vary) + [1649666635.306298][9078:9083] CHIP:EM: Sending Standalone Ack for MessageCounter:2077197 on exchange 1795i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH reads ColorTemperatureMireds attribute from DUT" - PICS: CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04 - command: "readAttribute" - attribute: "ColorTemperature" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "After another 2 seconds, TH reads ColorTemperatureMireds attribute + from DUT." + PICS: CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT + verification: | + ./chip-tool colorcontrol read color-temperature 1 1 + + Verify in TH(chip-tool) Log: + [1649666635.306093][9078:9083] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_0007 DataVersion: 4087364802 + [1649666635.306184][9078:9083] CHIP:TOO: ColorTemperature: 16000 (value can vary) + [1649666635.306298][9078:9083] CHIP:EM: Sending Standalone Ack for MessageCounter:2077197 on exchange 1795i + cluster: "LogCommands" + command: "UserPrompt" + arguments: + values: + - name: "message" + value: "please enter 'y' for success" + - name: "expectedValue" + value: "y" - - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp && CC.S.F04 - command: "StopMoveStep" + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" arguments: values: + - name: "EnhancedHue" + value: 20000 + - name: "Direction" + value: 0 + - name: "TransitionTime" + value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "TH reads ColorTemperatureMireds attribute from DUT" - PICS: CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04 - command: "readAttribute" - attribute: "ColorTemperature" - response: - saveAs: ColorTemperatureMiredsValue - constraints: - type: int16u - minValue: 0 - maxValue: 65279 - - - label: "Wait 500ms" + - label: "Wait 100ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 + value: 100 - label: - "Reads current color attribute value matched the value sent by the - last attribute" - PICS: CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04 - command: "readAttribute" - attribute: "ColorTemperature" - response: - value: ColorTemperatureMiredsValue - constraints: - type: int16u - minValue: 0 - maxValue: 65279 - - - label: "TH sends EnhancedMoveHue command to DUT." - PICS: CC.S.C41.Rsp && CC.S.F01 + "TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and + Rate=500 (units/s)" + PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: values: - name: "MoveMode" value: 1 - name: "Rate" - value: RateConfigValue + value: 500 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01 - command: "readAttribute" - attribute: "EnhancedCurrentHue" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65535 + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 - label: "TH sends StopMoveStep command to DUT" - PICS: CC.S.C47.Rsp && CC.S.F01 + PICS: CC.S.C47.Rsp command: "StopMoveStep" arguments: values: @@ -411,39 +397,36 @@ tests: value: 0 - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01 command: "readAttribute" + PICS: CC.S.A4000 && CC.S.C47.Rsp attribute: "EnhancedCurrentHue" response: saveAs: EnhancedCurrentHueValue constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 23500 + maxValue: 26500 - - label: "Wait 500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 + value: 10000 - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01 command: "readAttribute" + PICS: CC.S.A4000 && CC.S.C47.Rsp attribute: "EnhancedCurrentHue" response: - value: EnhancedCurrentHueValue constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: EnhancedCurrentHueValue + maxValue: 26500 - - label: "Turn off light that we turned on" + - label: "Turn Off light that we turned on" PICS: OO.S.C00.Rsp cluster: "On/Off" - command: "off" + command: "Off" - label: "Check on/off attribute value is false after off command" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index f03caa284c3927..bb94b6104f668e 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -198,13 +198,13 @@ tests: - name: "OptionsOverride" value: 1 - - label: "Wait 500ms" + - label: "Wait 13s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 500 + value: 13000 - label: "Physically verify that the device moves at the rate recorded in step diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0094816c310e4d..66c08265f94dd5 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -4157,9 +4157,8 @@ class Test_TC_CC_4_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; case 5: @@ -6851,7 +6850,7 @@ class Test_TC_CC_6_1Suite : public TestCommand class Test_TC_CC_6_2Suite : public TestCommand { public: - Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 39, credsIssuerConfig) + Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6874,8 +6873,6 @@ class Test_TC_CC_6_2Suite : public TestCommand uint16_t ColorTempPhysicalMinMiredsValue; uint16_t ColorTempPhysicalMaxMiredsValue; - uint16_t ColorTemperatureValue; - uint16_t ColorTemperatureMoveModeStop; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -6941,6 +6938,7 @@ class Test_TC_CC_6_2Suite : public TestCommand 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)); @@ -6948,13 +6946,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -6962,13 +6954,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -6976,16 +6962,11 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -6993,13 +6974,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -7007,13 +6982,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -7021,120 +6990,402 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } break; - case 23: + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Turn on light for color control tests"); + VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } + case 2: { + LogStep(2, "Check on/off attribute value is true after on command"); + VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, + "TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=(ColorTempPhysicalMinMireds + " + "ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 7: { + LogStep(7, + "TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 (up), Rate = (ColorTempPhysicalMaxMireds - " + "ColorTempPhysicalMinMireds)/40"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 8: { + LogStep(8, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 11: { + LogStep(11, + "TH sends MoveColorTemperature command to DUT with MoveMode = 0x03(down), Rate = (ColorTempPhysicalMaxMireds - " + "ColorTempPhysicalMinMireds)/20"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 15: { + LogStep(15, + "TH sends MoveColorTemperature command to DUT with MoveMode = 0x01(up), Rate = (ColorTempPhysicalMaxMireds - " + "ColorTempPhysicalMinMireds)/20"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 16: { + LogStep(16, + "After 10 seconds, TH sends MoveColorTemperature command to DUT with MoveMode = 0x00(stop), Rate = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/20"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "After another 2 seconds, TH reads ColorTemperatureMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "TH reads ColorMode attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0008 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 20: { + LogStep(20, "TH reads EnhancedColorMode attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4001 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 21: { + LogStep(21, "Turn off light that we turned on"); + VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional + + ); + } + case 22: { + LogStep(22, "Check on/off attribute value is false after off command"); + VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CC_6_3Suite : public TestCommand +{ +public: + Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 19, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_CC_6_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + uint16_t ColorTempPhysicalMinMiredsValue; + uint16_t ColorTempPhysicalMaxMiredsValue; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - ColorTemperatureValue = value; + VerifyOrReturn(CheckValue("onOff", value, 1)); } break; - case 25: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 26: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + ColorTempPhysicalMinMiredsValue = value; } break; - case 27: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + ColorTempPhysicalMaxMiredsValue = value; + } break; - case 28: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 29: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 30: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 31: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 32: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - ColorTemperatureMoveModeStop = value; - } + shouldContinue = true; break; - case 33: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 34: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureMoveModeStop)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; - case 35: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 36: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; - case 37: + 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 38: + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7205,260 +7456,124 @@ class Test_TC_CC_6_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } + case 6: { + LogStep(6, + "TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=(ColorTempPhysicalMinMireds + " + "ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } case 7: { - LogStep(7, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = 20U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); + LogStep(7, + "TH sends StepColorTemperature command to DUT with StepMode = 0x01 (up), StepSize = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/2 and TransitionTime = 200 (20s)."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 8: { - LogStep(8, "Wait 1000ms"); + LogStep(8, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, 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(kIdentityAlpha, value); } case 9: { - LogStep(9, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + LogStep(9, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 10: { - LogStep(10, "Wait 1000ms"); + LogStep(10, "After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, 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(kIdentityAlpha, value); } case 11: { - LogStep(11, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + LogStep(11, + "TH sends StepColorTemperature command to DUT with StepMode = 0x03 (down), StepSize = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds) and TransitionTime = 200 (20s)."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 12: { - LogStep(12, "Wait 1000ms"); + LogStep(12, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, 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(kIdentityAlpha, value); } case 13: { - LogStep(13, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + LogStep(13, "After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 14: { - LogStep(14, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(3); - value.rate = 20U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); + LogStep(14, "After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 15: { - LogStep(15, "Wait 1000ms"); + LogStep(15, "TH reads ColorMode attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0008 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, 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(kIdentityAlpha, value); } case 16: { - LogStep(16, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 19: { - LogStep(19, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 20: { - LogStep(20, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 21: { - LogStep(21, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = 20U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 22: { - LogStep(22, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(0); - value.rate = 20U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 23: { - LogStep(23, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "Wait 1000ms"); + LogStep(16, "TH reads EnhancedColorMode attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A4001 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 28: { - LogStep(28, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(3); - value.rate = 20U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(0); - value.rate = 20U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, - value, chip::NullOptional - - ); - } - case 31: { - LogStep(31, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 32: { - LogStep(32, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 35: { - LogStep(35, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 36: { - LogStep(36, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } - case 37: { - LogStep(37, "Turn off light that we turned on"); + case 17: { + LogStep(17, "Turn Off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -7466,8 +7581,8 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 38: { - LogStep(38, "Check on/off attribute value is false after off command"); + case 18: { + LogStep(18, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -7476,10 +7591,10 @@ class Test_TC_CC_6_2Suite : public TestCommand } }; -class Test_TC_CC_6_3Suite : public TestCommand +class Test_TC_CC_7_2Suite : public TestCommand { public: - Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 23, credsIssuerConfig) + Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -7487,7 +7602,7 @@ class Test_TC_CC_6_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_6_3Suite() {} + ~Test_TC_CC_7_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -7500,9 +7615,6 @@ class Test_TC_CC_6_3Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint16_t ColorTempPhysicalMinMiredsValue; - uint16_t ColorTempPhysicalMaxMiredsValue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -7524,50 +7636,30 @@ class Test_TC_CC_6_3Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMinMiredsValue = value; - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTempPhysicalMaxMiredsValue = value; - } break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 22500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 27500U)); } 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; @@ -7577,9 +7669,8 @@ class Test_TC_CC_6_3Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32500U)); } break; case 10: @@ -7587,78 +7678,117 @@ class Test_TC_CC_6_3Suite : public TestCommand shouldContinue = true; break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 34000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 36500U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 34500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 36500U)); } break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 17500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 22500U)); } break; - case 17: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 12500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 17500U)); } break; - case 19: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12500U)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12500U)); + } + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 21: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } break; - case 22: + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7689,7 +7819,16 @@ class Test_TC_CC_6_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -7697,111 +7836,148 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 20000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); + LogStep(5, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=500 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(1); + value.rate = 500U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional + + ); } case 6: { - LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + LogStep(6, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "TH sends StepColorTemperature command to DUT with MoveMode = Up"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; - value.stepMode = static_cast(1); - value.stepSize = 100U; - value.transitionTime = 15U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, - value, chip::NullOptional - - ); + LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); } case 8: { - LogStep(8, "Wait 500ms"); + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Wait 500ms"); + LogStep(10, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + LogStep(11, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional + + ); } case 12: { - LogStep(12, "Wait 700ms"); + LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 13: { + LogStep(13, "Wait 2s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 700UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + case 14: { + LogStep(14, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "TH sends StepColorTemperature command to DUT with MoveMode = Down"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; - value.stepMode = static_cast(3); - value.stepSize = 100U; - value.transitionTime = 10U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, + case 15: { + LogStep(15, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 25000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional ); } + case 16: { + LogStep(16, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x03 (down) and Rate=500 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(3); + value.rate = 500U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional + + ); + } case 15: { LogStep(15, "Wait 500ms"); ListFreer listFreer; @@ -8766,16 +8942,11 @@ class Test_TC_CC_7_4Suite : public TestCommand class Test_TC_CC_8_1Suite : public TestCommand { public: - Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 41, credsIssuerConfig) + Test_TC_CC_8_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_8_1", 36, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); - AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); - AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); - AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); - AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -8790,18 +8961,11 @@ class Test_TC_CC_8_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateConfigValue; - chip::Optional mRateXConfigValue; - chip::Optional mRateYConfigValue; - chip::Optional mColorTemperatureMinMiredsConfigValue; - chip::Optional mColorTemperatureMaxMiredsConfigValue; chip::Optional mTimeout; - uint8_t CurrentHueValue; uint8_t CurrentSaturationValue; - uint16_t CurrentXValue; - uint16_t CurrentYValue; - uint16_t ColorTemperatureMiredsValue; + uint16_t ColorTempPhysicalMinMireds; + uint16_t ColorTempPhysicalMaxMireds; uint16_t EnhancedCurrentHueValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -8825,102 +8989,73 @@ class Test_TC_CC_8_1Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 235U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - CurrentHueValue = value; } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValue)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 240U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - CurrentSaturationValue = value; - } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationValue)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); + CurrentSaturationValue = value; } break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; @@ -8928,11 +9063,10 @@ class Test_TC_CC_8_1Suite : public TestCommand case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentSaturationValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 19: @@ -8943,12 +9077,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + ColorTempPhysicalMinMireds = value; } break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -8956,19 +9088,16 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - CurrentXValue = value; + ColorTempPhysicalMaxMireds = value; } break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - CurrentYValue = value; - } + shouldContinue = true; break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8976,25 +9105,11 @@ class Test_TC_CC_8_1Suite : public TestCommand 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("currentX", value, CurrentXValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, CurrentYValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -9005,89 +9120,41 @@ class Test_TC_CC_8_1Suite : public TestCommand break; case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } 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", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - ColorTemperatureMiredsValue = value; - } break; case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureMiredsValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 23500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 26500U)); EnhancedCurrentHueValue = value; } break; - case 37: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 38: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, EnhancedCurrentHueValue)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 26500U)); } break; - case 39: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 40: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -9118,7 +9185,16 @@ class Test_TC_CC_8_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -9126,27 +9202,37 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, + "TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 200U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); } case 4: { - LogStep(4, "TH sends MoveHue command to DUT"); + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(1); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.rate = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, @@ -9154,14 +9240,15 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } case 6: { - LogStep(6, "TH sends StopMoveStep command to DUT"); + LogStep(6, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -9172,221 +9259,195 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Wait 100ms"); + case 9: { + LogStep(9, "Wait 2s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 10: { + LogStep(10, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH sends MoveSaturation command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(1); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; + value.saturation = 150U; + value.transitionTime = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, + value, chip::NullOptional ); } - case 11: { - LogStep(11, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } case 12: { - LogStep(12, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Wait 100ms"); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; + value.moveMode = static_cast(1); + value.rate = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, chip::NullOptional ); } - case 13: { - LogStep(13, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } case 14: { - LogStep(14, "Wait 100ms"); + LogStep(14, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 15: { - LogStep(15, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 16: { - LogStep(16, "TH sends MoveColor command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = mRateXConfigValue.HasValue() ? mRateXConfigValue.Value() : 50; - value.rateY = mRateYConfigValue.HasValue() ? mRateYConfigValue.Value() : 50; + chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, chip::NullOptional ); } + case 16: { + LogStep(16, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } case 17: { - LogStep(17, "Wait 500ms"); + LogStep(17, "Wait 2s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } case 18: { - LogStep(18, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); + LogStep(18, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); } case 19: { - LogStep(19, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); + LogStep(19, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, - chip::NullOptional - - ); + LogStep(20, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); + LogStep(21, + "TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds= ColorTempPhysicalMaxMireds / 2 " + "and TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 22: { - LogStep(22, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); + LogStep( + 22, + "TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 (up), Rate = ColorTempPhysicalMaxMireds / 40"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 23: { - LogStep(23, "Wait 1000ms"); + LogStep(23, "After 10 seconds, TH sends StopMoveStep command to DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C47.Rsp && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, 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(kIdentityAlpha, value); } case 24: { - LogStep(24, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); + LogStep(24, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && 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 25: { - LogStep(25, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); + LogStep(25, "After another 2 seconds, TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 26: { - LogStep(26, "TH sends MoveColorTemperature command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type value; - value.moveMode = static_cast(1); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; - value.colorTemperatureMinimumMireds = - mColorTemperatureMinMiredsConfigValue.HasValue() ? mColorTemperatureMinMiredsConfigValue.Value() : 1U; - value.colorTemperatureMaximumMireds = - mColorTemperatureMaxMiredsConfigValue.HasValue() ? mColorTemperatureMaxMiredsConfigValue.Value() : 255U; + LogStep(26, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 20000U; + value.direction = static_cast(0); + value.transitionTime = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColorTemperature::Id, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional ); } case 27: { - LogStep(27, "Wait 1000ms"); + LogStep(27, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } case 28: { - LogStep(28, "TH reads ColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StopMoveStep::Id, value, - chip::NullOptional - - ); - } - case 30: { - LogStep(30, "TH reads ColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 31: { - LogStep(31, "Wait 500ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs(kIdentityAlpha, value); - } - case 32: { - LogStep(32, "Reads current color attribute value matched the value sent by the last attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 33: { - LogStep(33, "TH sends EnhancedMoveHue command to DUT."); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(28, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=500 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; value.moveMode = static_cast(1); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.rate = 500U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, @@ -9394,15 +9455,16 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 34: { - LogStep(34, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); + case 29: { + LogStep(29, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "TH sends StopMoveStep command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 30: { + LogStep(30, "TH sends StopMoveStep command to DUT"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; value.optionsMask = 0U; @@ -9412,27 +9474,27 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 36: { - LogStep(36, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 31: { + LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Wait 500ms"); + case 32: { + LogStep(32, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 38: { - LogStep(38, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 33: { + LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Turn off light that we turned on"); + case 34: { + LogStep(34, "Turn Off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -9440,8 +9502,8 @@ class Test_TC_CC_8_1Suite : public TestCommand ); } - case 40: { - LogStep(40, "Check on/off attribute value is false after off command"); + case 35: { + LogStep(35, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -16013,17 +16075,36 @@ class Test_TC_LVL_4_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 18: { - LogStep(18, - "Physically verify that the device moves at the rate recorded in step 3a and completes moving to its maximum " - "level"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && LVL.S.C05.Rsp && LVL.S.A0014"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(18, "TH reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "Wait 10s"); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 20: { + LogStep(20, "TH reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); + } + case 21: { + LogStep(21, "Wait 13s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 13000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 22: { + LogStep(22, "TH reads CurrentLevel attribute from DUT"); + VerifyOrDo(!ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, + chip::NullOptional); } case 19: { LogStep(19, "Precondition send Off Command"); @@ -78309,6 +78390,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); + AddArgument("PakeVerifier", &mPakeVerifier); } ~Test_TC_CADMIN_1_3Suite() {} @@ -78322,6 +78404,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mDiscriminator; chip::Optional mPayload; + chip::Optional mPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -78474,12 +78557,14 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221("MT:0000000000I31506010", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 5: { @@ -78569,12 +78654,14 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221("MT:0000000000I31506010", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityAlpha, value); } } @@ -78949,6 +79038,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); + AddArgument("PakeVerifier", &mPakeVerifier); + AddArgument("IncorrectPakeVerifier", &mIncorrectPakeVerifier); } ~Test_TC_CADMIN_1_5Suite() {} @@ -78964,6 +79055,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mDiscriminator; chip::Optional mPayload; + chip::Optional mPakeVerifier; + chip::Optional mIncorrectPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -79065,12 +79158,14 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221 mDiscriminator; chip::Optional mCorrectPayload; chip::Optional mIncorrectSetupCodePayload; + chip::Optional mPakeVerifier; uint8_t tempFabricIndex; @@ -79731,12 +79836,14 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 900U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan(chip::Uint8::from_const_char( + "\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326\360," + "D4\362\275\322z\244\371\316\247\015s\216L"), + 97); value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -79787,12 +79894,14 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 900U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan(chip::Uint8::from_const_char( + "\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" + "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" + "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357\326\360," + "D4\362\275\322z\244\371\316\247\015s\216L"), + 97); value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; value.iterations = 1000UL; value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); @@ -80502,6 +80611,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); + AddArgument("PakeVerifier", &mPakeVerifier); } ~Test_TC_CADMIN_1_13Suite() {} @@ -80517,6 +80627,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mDiscriminator; chip::Optional mPayload; + chip::Optional mPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -80718,13 +80829,15 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221 mNodeId; chip::Optional mTimeout; chip::Optional mEndpoint; + chip::Optional mDiscriminator; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -81016,6 +81139,8 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("PakeVerifier", &mPakeVerifier); } ~Test_TC_CADMIN_1_24Suite() {} @@ -81026,6 +81151,8 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand chip::Optional mNodeId; chip::Optional mTimeout; chip::Optional mEndpoint; + chip::Optional mDiscriminator; + chip::Optional mPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -81124,13 +81251,15 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEVerifier = chip::ByteSpan( - chip::Uint8::from_const_char("\006\307V\337\374\327\042e4R\241-\315\224]\214T\332+\017<\275\033M\303\361\255\262#" - "\256\262k\004|\322L\226\206o\227\233\035\203\354P\342\264\2560\315\362\375\263+" - "\330\242\021\2707\334\224\355\315V\364\321Cw\031\020v\277\305\235\231\267\3350S\357" - "\326\360,D4\362\275\322z\244\371\316\247\015s\216Lgarbage: not in length on purpose"), - 97); - value.discriminator = 3840U; + value.PAKEVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\271ap\252\350\0034h\204rO\351\243\262\207\303\0030\302\246`7]\027\273 " + "Z\214\361\256\3135\004W\370\253y\356%:\266\250\344k\260\236T:\344\042sm\345\001\343\3337\324A\3764I " + "\320\225H\344\301\202@c\014O\364\221("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 80U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 115U)); NextTest(); }]; @@ -12819,100 +12818,142 @@ class Test_TC_CC_6_3 : public TestCommandBridge { err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends MoveToColorTemperature command to DUT with " + "ColorTemperatureMireds=(ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 " + "(immediately).\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); + err = TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMinMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 (up), Rate = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/40\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01UpRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds40_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 500ms\n"); - err = TestWait500ms_8(); + ChipLogProgress( + chipTool, " ***** Test Step 8 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 9 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 500ms\n"); - err = TestWait500ms_10(); + ChipLogProgress( + chipTool, " ***** Test Step 10 : After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends MoveColorTemperature command to DUT with MoveMode = 0x03(down), Rate = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/20\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x03downRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 700ms\n"); - err = TestWait700ms_12(); + ChipLogProgress( + chipTool, " ***** Test Step 12 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 13 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 14 : After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14(); + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 500ms\n"); - err = TestWait500ms_15(); + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH sends MoveColorTemperature command to DUT with MoveMode = 0x01(up), Rate = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/20\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01upRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 16 : After 10 seconds, TH sends MoveColorTemperature command to DUT with MoveMode = 0x00(stop), " + "Rate = (ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/20\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16(); + err = TestAfter10SecondsThSendsMoveColorTemperatureCommandToDutWithMoveMode0x00stopRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); - err = TestWait500ms_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 18 : After another 2 seconds, TH reads ColorTemperatureMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18(); + err = TestAfterAnother2SecondsThReadsColorTemperatureMiredsAttributeFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); - err = TestWait500ms_19(); + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads ColorMode attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0008 && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads EnhancedColorMode attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A4001 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20(); + err = TestThReadsEnhancedColorModeAttributeFromDut_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : Turn off light that we turned on\n"); @@ -13179,288 +13220,192 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7() + CHIP_ERROR + TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMinMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_6() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = [NSNumber numberWithUnsignedShort:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:15U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepColorTemperature command to DUT with MoveMode = Up Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - 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 TestWait500ms_8() + CHIP_ERROR + TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01UpRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds40_7() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - 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 TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9() + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_8() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not 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 TestWait500ms_10() + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - 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 TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11() + CHIP_ERROR TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not 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 TestWait700ms_12() + CHIP_ERROR + TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x03downRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_11() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 700UL; - 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 TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not 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(); - }]; + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_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); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_14() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14() + CHIP_ERROR + TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01upRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_15() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not 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 = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedShort:100U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepColorTemperature command to DUT with MoveMode = Down Error: %@", err); + CHIP_ERROR + TestAfter10SecondsThSendsMoveColorTemperatureCommandToDutWithMoveMode0x00stopRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_16() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_17() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - NextTest(); - }]; + CHIP_ERROR TestAfterAnother2SecondsThReadsColorTemperatureMiredsAttributeFromDut_18() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThReadsColorModeAttributeFromDut_19() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestWait500ms_15() + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_20() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - 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 TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_21() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); + [cluster offWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_17() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); + [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } NextTest(); }]; return CHIP_NO_ERROR; } +}; - CHIP_ERROR TestWait500ms_19() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_21() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is false after off command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_2 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CC_7_2() - : TestCommandBridge("Test_TC_CC_7_2") - , mTestIndex(0) +class Test_TC_CC_7_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CC_7_2() + : TestCommandBridge("Test_TC_CC_7_2") + , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -13539,156 +13484,121 @@ class Test_TC_CC_7_2 : public TestCommandBridge { err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { - NextTest(); - return; - } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { - NextTest(); - return; - } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); - err = TestWait1000ms_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends MoveToColorTemperature command to DUT with " + "ColorTemperatureMireds=(ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds)/2 and TransitionTime=0 " + "(immediately).\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11(); + err = TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMinMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_6(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH sends StepColorTemperature command to DUT with StepMode = 0x01 (up), StepSize = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds)/2 and TransitionTime = 200 (20s).\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12(); + err = TestThSendsStepColorTemperatureCommandToDutWithStepMode0x01UpStepSizeColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds2AndTransitionTime20020s_7(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + case 8: + ChipLogProgress( + chipTool, " ***** Test Step 8 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_8(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + case 9: + ChipLogProgress( + chipTool, " ***** Test Step 9 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends EnhancedMoveHue command to DUT with MoveMode Down\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + case 10: + ChipLogProgress( + chipTool, " ***** Test Step 10 : After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); - err = TestWait500ms_17(); + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends StepColorTemperature command to DUT with StepMode = 0x03 (down), StepSize = " + "(ColorTempPhysicalMaxMireds - ColorTempPhysicalMinMireds) and TransitionTime = 200 (20s).\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18(); + err = TestThSendsStepColorTemperatureCommandToDutWithStepMode0x03DownStepSizeColorTempPhysicalMaxMiredsColorTempPhysicalMinMiredsAndTransitionTime20020s_11(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); - err = TestWait500ms_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + case 12: + ChipLogProgress( + chipTool, " ***** Test Step 12 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 500ms\n"); - err = TestWait500ms_21(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + case 13: + ChipLogProgress( + chipTool, " ***** Test Step 13 : After 10 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_13(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + case 14: + ChipLogProgress( + chipTool, " ***** Test Step 14 : After another 5 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23(); + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_14(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads ColorMode attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0008 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); - err = TestWait1000ms_25(); + err = TestThReadsColorModeAttributeFromDut_15(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads EnhancedColorMode attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A4001 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26(); + err = TestThReadsEnhancedColorModeAttributeFromDut_16(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Turn off light that we turned on\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Turn Off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_27(); + err = TestTurnOffLightThatWeTurnedOn_17(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Check on/off attribute value is false after off command\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18(); break; } @@ -13758,36 +13668,6 @@ class Test_TC_CC_7_2 : 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; } // Go on to the next test. @@ -13801,7 +13681,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -13920,20 +13800,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestWait1000ms_6() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13941,29 +13815,26 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMaxMiredsValue = value; + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13971,14 +13842,16 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); + VerifyOrReturn( + CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -13986,334 +13859,117 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_10() + CHIP_ERROR + TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMinMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_6() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - 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); } + NSNumber * _Nonnull EnhancedCurrentHueStep5b; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11() + CHIP_ERROR + TestThSendsStepColorTemperatureCommandToDutWithStepMode0x01UpStepSizeColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds2AndTransitionTime20020s_7() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_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); + } - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Stop Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull EnhancedCurrentHueStep3b; - - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - { - EnhancedCurrentHueStep3b = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep3b)); - } - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Down Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait500ms_17() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18() + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait500ms_19() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not 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 TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20() + CHIP_ERROR TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - 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 TestWait500ms_21() + CHIP_ERROR + TestThSendsStepColorTemperatureCommandToDutWithStepMode0x03DownStepSizeColorTempPhysicalMaxMiredsColorTempPhysicalMinMiredsAndTransitionTime20020s_11() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - 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 TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22() + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - 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 TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23() + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_13() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:0U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Stop Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - 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 EnhancedCurrentHueStep5b; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24() + CHIP_ERROR TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_14() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - { - EnhancedCurrentHueStep5b = value; - } - - 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 TestWait1000ms_25() + CHIP_ERROR TestThReadsColorModeAttributeFromDut_15() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - 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 TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26() + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_16() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep5b)); - } - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - - NextTest(); - }]; - - 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 TestTurnOffLightThatWeTurnedOn_27() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14323,7 +13979,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -15174,11 +14830,6 @@ class Test_TC_CC_8_1 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); - AddArgument("RateXConfigValue", INT16_MIN, INT16_MAX, &mRateXConfigValue); - AddArgument("RateYConfigValue", INT16_MIN, INT16_MAX, &mRateYConfigValue); - AddArgument("ColorTemperatureMinMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMinMiredsConfigValue); - AddArgument("ColorTemperatureMaxMiredsConfigValue", 0, UINT16_MAX, &mColorTemperatureMaxMiredsConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -15212,297 +14863,262 @@ class Test_TC_CC_8_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { NextTest(); return; } - err = TestTurnOnLightForColorControlTests_1(); + err = TestThWrites0ToTheOptionsAttribute_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Check on/off attribute value is true after on command\n"); - if (ShouldSkip("OO.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2(); + err = TestThSendsOnCommandToDut_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately).\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C00.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToHueCommandToDutWithHue200Direction0x00ShortestDistanceAndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends MoveHue command to DUT\n"); - if (ShouldSkip("CC.S.C01.Rsp && CC.S.F00")) { - NextTest(); - return; - } - err = TestThSendsMoveHueCommandToDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00")) { + ChipLogProgress( + chipTool, " ***** Test Step 5 : TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)\n"); + if (ShouldSkip("CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_5(); + err = TestThSendsMoveHueCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { - NextTest(); - return; - } - err = TestThSendsStopMoveStepCommandToDut_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_7(); + err = TestThSendsStopMoveStepCommandToDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 100ms\n"); - err = TestWait100ms_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A0000 && CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDut_9(); + err = TestThReadsCurrentHueAttributeFromDut_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 2s\n"); + err = TestWait2s_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends MoveSaturation command to DUT\n"); - if (ShouldSkip("CC.S.C04.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A0000 && CC.S.C01.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDut_10(); + err = TestThReadsCurrentHueAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001 && CC.S.C04.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " + "(immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_11(); + err = TestThSendsMoveToSaturationCommandToDutWithSaturation150AndTransitionTime0Immediately_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { - NextTest(); - return; - } - err = TestThSendsStopMoveStepCommandToDut_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 100ms\n"); + err = TestWait100ms_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, + " ***** Test Step 13 : TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_13(); + err = TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); - err = TestWait100ms_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10s\n"); + err = TestWait10s_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.A0001 && CC.S.C47.Rsp && CC.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp && CC.S.F00")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_15(); + err = TestThSendsStopMoveStepCommandToDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends MoveColor command to DUT\n"); - if (ShouldSkip("CC.S.C08.Rsp && CC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveColorCommandToDut_16(); + err = TestThReadsCurrentSaturationAttributeFromDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); - err = TestWait500ms_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 2s\n"); + err = TestWait2s_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003 && CC.S.C08.Rsp && CC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_18(); + err = TestThReadsCurrentSaturationAttributeFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004 && CC.S.C08.Rsp && CC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_19(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_20(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 21 : TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds= " + "ColorTempPhysicalMaxMireds / 2 and TransitionTime=0 (immediately).\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_21(); + err = TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { + ChipLogProgress(chipTool, + " ***** Test Step 22 : TH sends MoveColorTemperature command to DUT with MoveMode = 0x01 (up), Rate = " + "ColorTempPhysicalMaxMireds / 40\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_22(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01UpRateColorTempPhysicalMaxMireds40_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); - err = TestWait1000ms_23(); + ChipLogProgress(chipTool, " ***** Test Step 23 : After 10 seconds, TH sends StopMoveStep command to DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C47.Rsp && PICS_USER_PROMPT")) { + NextTest(); + return; + } + err = TestAfter10SecondsThSendsStopMoveStepCommandToDut_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0003 && CC.S.C47.Rsp && CC.S.F03")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_24(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { + ChipLogProgress( + chipTool, " ***** Test Step 25 : After another 2 seconds, TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && PICS_USER_PROMPT")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_25(); + err = TestAfterAnother2SecondsThReadsColorTemperatureMiredsAttributeFromDut_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends MoveColorTemperature command to DUT\n"); - if (ShouldSkip("CC.S.C4B.Rsp && CC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, Direction=0x00 (shortest " + "distance) and TransitionTime=0 (immediately).\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C40.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDut_26(); + err = TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue20000Direction0x00ShortestDistanceAndTransitionTime0Immediately_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); - err = TestWait1000ms_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 100ms\n"); + err = TestWait100ms_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads ColorTemperatureMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04")) { + ChipLogProgress(chipTool, + " ***** Test Step 28 : TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=500 (units/s)\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_28(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x01UpAndRate500UnitsS_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F04")) { - NextTest(); - return; - } - err = TestThSendsStopMoveStepCommandToDut_29(); + ChipLogProgress(chipTool, " ***** Test Step 29 : Wait 10s\n"); + err = TestWait10s_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads ColorTemperatureMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_30(); + err = TestThSendsStopMoveStepCommandToDut_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 500ms\n"); - err = TestWait500ms_31(); - break; - case 32: - ChipLogProgress(chipTool, - " ***** Test Step 32 : Reads current color attribute value matched the value sent by the last attribute\n"); - if (ShouldSkip("CC.S.A0007 && CC.S.C47.Rsp && CC.S.F04")) { - NextTest(); - return; - } - err = TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends EnhancedMoveHue command to DUT.\n"); - if (ShouldSkip("CC.S.C41.Rsp && CC.S.F01")) { - NextTest(); - return; - } - err = TestThSendsEnhancedMoveHueCommandToDut_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000 && CC.S.C41.Rsp && CC.S.F01")) { + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_34(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_31(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F01")) { - NextTest(); - return; - } - err = TestThSendsStopMoveStepCommandToDut_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { - NextTest(); - return; - } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_36(); - break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Wait 500ms\n"); - err = TestWait500ms_37(); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 10s\n"); + err = TestWait10s_32(); break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp && CC.S.F01")) { + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.A4000 && CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_38(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_33(); break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Turn off light that we turned on\n"); + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Turn Off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_39(); + err = TestTurnOffLightThatWeTurnedOn_34(); break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Check on/off attribute value is false after off command\n"); + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_35(); break; } @@ -15596,349 +15212,61 @@ class Test_TC_CC_8_1 : public TestCommandBridge { case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - 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 = 41; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mRateConfigValue; - chip::Optional mRateXConfigValue; - chip::Optional mRateYConfigValue; - chip::Optional mColorTemperatureMinMiredsConfigValue; - chip::Optional mColorTemperatureMaxMiredsConfigValue; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestTurnOnLightForColorControlTests_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:0U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsMoveHueCommandToDut_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_5() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_6() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull CurrentHueValue; - - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_7() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - { - CurrentHueValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait100ms_8() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValue)); - } - - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - - NextTest(); - }]; + 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; + } - return CHIP_NO_ERROR; + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); } - CHIP_ERROR TestThSendsMoveSaturationCommandToDut_10() + chip::System::Clock::Timeout GetWaitDuration() const override { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - - NextTest(); - }]; +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 36; - return CHIP_NO_ERROR; - } + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_12() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stopMoveStepWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StopMoveStep command to DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - 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 CurrentSaturationValue; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15946,60 +15274,38 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - { - CurrentSaturationValue = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_15() + CHIP_ERROR TestThSendsOnCommandToDut_2() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; + MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationValue)); - } - - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorCommandToDut_16() + CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue200Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16007,16 +15313,17 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX - = mRateXConfigValue.HasValue() ? [NSNumber numberWithShort:mRateXConfigValue.Value()] : [NSNumber numberWithShort:50]; - params.rateY - = mRateYConfigValue.HasValue() ? [NSNumber numberWithShort:mRateYConfigValue.Value()] : [NSNumber numberWithShort:50]; + __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; + params.hue = [NSNumber numberWithUnsignedChar:200U]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorWithParams:params + [cluster moveToHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and " + @"TransitionTime=0 (immediately). Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16026,14 +15333,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_17() + CHIP_ERROR TestWait100ms_4() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_18() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16041,45 +15348,31 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_19() + CHIP_ERROR TestWait10s_6() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_20() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16101,69 +15394,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentXValue; - - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_21() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); - { - CurrentXValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull CurrentYValue; - - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_22() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); - { - CurrentYValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_23() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_24() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16171,19 +15403,13 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, CurrentXValue)); - } - - VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 235U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -16191,7 +15417,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_25() + CHIP_ERROR TestWait2s_9() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16199,19 +15432,13 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, CurrentYValue)); - } - - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 240U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); NextTest(); }]; @@ -16219,7 +15446,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDut_26() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation150AndTransitionTime0Immediately_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16227,38 +15454,33 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:50U]; - params.colorTemperatureMinimumMireds = mColorTemperatureMinMiredsConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mColorTemperatureMinMiredsConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:1U]; - params.colorTemperatureMaximumMireds = mColorTemperatureMaxMiredsConfigValue.HasValue() - ? [NSNumber numberWithUnsignedShort:mColorTemperatureMaxMiredsConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:255U]; + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = [NSNumber numberWithUnsignedChar:150U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColorTemperature command to DUT Error: %@", err); + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=150 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_27() + CHIP_ERROR TestWait100ms_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_28() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16266,22 +15488,32 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveSaturation command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_29() + CHIP_ERROR TestWait10s_14() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16303,9 +15535,9 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull ColorTemperatureMiredsValue; + NSNumber * _Nonnull CurrentSaturationValue; - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_30() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16313,16 +15545,15 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); { - ColorTemperatureMiredsValue = value; + CurrentSaturationValue = value; } NextTest(); @@ -16331,14 +15562,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_31() + CHIP_ERROR TestWait2s_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadsCurrentColorAttributeValueMatchedTheValueSentByTheLastAttribute_32() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16346,27 +15577,23 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads current color attribute value matched the value sent by the last attribute Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureMiredsValue)); - } - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + VerifyOrReturn( + CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], CurrentSaturationValue)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); NextTest(); }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ColorTempPhysicalMinMireds; - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDut_33() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16374,25 +15601,136 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:50U]; + [cluster + readAttributeColorTempPhysicalMinMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMinMireds attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMinMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMinMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMinMireds = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + NSNumber * _Nonnull ColorTempPhysicalMaxMireds; + + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_20() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMaxMireds = value; + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_21() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01UpRateColorTempPhysicalMaxMireds40_22() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestAfter10SecondsThSendsStopMoveStepCommandToDut_23() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_24() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestAfterAnother2SecondsThReadsColorTemperatureMiredsAttributeFromDut_25() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR + TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue20000Direction0x00ShortestDistanceAndTransitionTime0Immediately_26() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.enhancedHue = [NSNumber numberWithUnsignedShort:20000U]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveHue command to DUT. Error: %@", err); + [cluster enhancedMoveToHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, Direction=0x00 (shortest " + @"distance) and TransitionTime=0 (immediately). 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 TestThReadsEnhancedCurrentHueAttributeFromDut_34() + CHIP_ERROR TestWait100ms_27() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x01UpAndRate500UnitsS_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16400,22 +15738,33 @@ class Test_TC_CC_8_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:1U]; + params.rate = [NSNumber numberWithUnsignedShort:500U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + enhancedMoveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=500 (units/s) Error: %@", + err); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_35() + CHIP_ERROR TestWait10s_29() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16439,7 +15788,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { } NSNumber * _Nonnull EnhancedCurrentHueValue; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_36() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16452,9 +15801,8 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 23500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 26500U)); { EnhancedCurrentHueValue = value; } @@ -16465,14 +15813,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_37() + CHIP_ERROR TestWait10s_32() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_38() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16485,14 +15833,9 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueValue)); - } - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn( + CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], EnhancedCurrentHueValue)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 26500U)); NextTest(); }]; @@ -16500,14 +15843,14 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_39() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster offWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn off light that we turned on Error: %@", err); + NSLog(@"Turn Off light that we turned on Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -16517,7 +15860,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_40() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -26128,7 +25471,31 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestPhysicallyVerifyThatTheDeviceMovesAtTheRateRecordedInStep3aAndCompletesMovingToItsMaximumLevel_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Precondition send Off Command\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 10s\n"); + err = TestWait10s_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 13s\n"); + err = TestWait13s_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C01.Rsp && LVL.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentLevelAttributeFromDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Precondition send Off Command\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; @@ -26574,10 +25941,10 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_17() + CHIP_ERROR TestWait13s_21() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 13000UL; return WaitForMs("alpha", value); }