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 907bc3ee653459..4b151704ebc91d 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: "Precondition: Reset Devices to factory defaults" @@ -187,7 +191,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" @@ -233,7 +237,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" @@ -260,7 +264,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" @@ -306,7 +310,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" @@ -325,7 +329,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_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index 7780548aa0f1e8..7f521e503c5e82 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: "Precondition: Reset Devices to factory defaults" @@ -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 275e969116da41..736adc1aad733b 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: "Precondition: Reset Devices to factory defaults" @@ -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 769ee2ff3374a5..4206dbdaaacab9 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: "Precondition: Reset Devices to factory defaults" @@ -69,7 +73,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" @@ -203,7 +207,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" @@ -239,7 +243,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 b06946cf447c43..a27b47f8dc672b 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: "Precondition: Reset Devices to factory defaults" @@ -77,7 +84,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" @@ -117,7 +124,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" @@ -181,7 +188,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" @@ -201,8 +208,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: - "\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" + value: PakeVerifier - name: "discriminator" value: discriminator - name: "iterations" @@ -220,8 +226,7 @@ tests: - name: "CommissioningTimeout" value: 180 - name: "PAKEVerifier" - value: - "\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" + 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 1811e183848d25..20e868f55f1091 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: "Precondition: Reset Devices to factory defaults" @@ -82,7 +85,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" @@ -145,7 +148,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 758af9c9ac5e38..861d16be0b72aa 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 @@ -114,7 +114,7 @@ tests: attribute: "CurrentSaturation" response: constraints: - minValue: 85 + minValue: 80 maxValue: 115 - label: "Wait 10s" 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 6c9646b0cb7595..b889a4cc1b567c 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 @@ -76,340 +76,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 a5990c1067cdaf..037aa84675a92b 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 @@ -76,158 +76,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 1b07405309e765..e8a371c97eff0e 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 @@ -150,7 +150,7 @@ tests: response: constraints: minValue: 34000 - maxValue: 36000 + maxValue: 36500 - label: "Wait 2s" cluster: "DelayCommands" @@ -168,7 +168,7 @@ tests: response: constraints: minValue: 34500 - maxValue: 36000 + maxValue: 36500 - label: "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, @@ -276,7 +276,7 @@ tests: attribute: "EnhancedCurrentHue" response: constraints: - minValue: 9500 + minValue: 7500 maxValue: 12500 - label: "Wait 2s" @@ -294,7 +294,7 @@ tests: attribute: "EnhancedCurrentHue" response: constraints: - minValue: 9500 + minValue: 7500 maxValue: 12500 - label: "TH reads ColorMode attribute from DUT" 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 a13e0c10c5d5a5..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 85bb6f169d5aa1..671a275aeca385 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 @@ -211,13 +211,13 @@ tests: minValue: 170 maxValue: 230 - - label: "Wait 12s" + - label: "Wait 13s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 12000 + value: 13000 - label: "TH reads CurrentLevel attribute from DUT" PICS: LVL.S.C01.Rsp && LVL.S.A0000 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0f57ee277a5186..28810d5a233c3e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -4838,7 +4838,7 @@ class Test_TC_CC_4_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; @@ -8302,7 +8302,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", 38, 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); @@ -8325,8 +8325,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; } @@ -8384,6 +8382,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8391,13 +8390,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8405,13 +8398,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8419,16 +8406,11 @@ class Test_TC_CC_6_2Suite : public TestCommand 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, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8436,13 +8418,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8450,13 +8426,7 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } + shouldContinue = true; break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8464,120 +8434,16 @@ class Test_TC_CC_6_2Suite : public TestCommand 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, 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)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - ColorTemperatureValue = value; - } - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - 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 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - 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)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - ColorTemperatureMoveModeStop = value; - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 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)); - } - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTemperatureValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); - } - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -8644,259 +8510,167 @@ class Test_TC_CC_6_2Suite : public TestCommand true, chip::NullOptional); } case 6: { - LogStep(6, "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(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, "Wait 1000ms"); + 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::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 8: { - LogStep(8, "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(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, "Wait 1000ms"); + 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::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 10: { - LogStep(10, "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(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, "Wait 1000ms"); + 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::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 12: { - LogStep(12, "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(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, "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(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, "Wait 1000ms"); + 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::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 15: { - LogStep(15, "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(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, "Wait 1000ms"); + 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::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 17: { - LogStep(17, "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(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, "Wait 1000ms"); + 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::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 19: { - LogStep(19, "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 20: { - LogStep(20, "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 21: { - LogStep(21, "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 22: { - LogStep(22, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 24: { - LogStep(24, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 25: { - LogStep(25, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 26: { - LogStep(26, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 27: { - LogStep(27, "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 28: { - LogStep(28, "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 29: { - LogStep(29, "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 30: { - LogStep(30, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 32: { - LogStep(32, "Wait 1000ms"); + 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::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 33: { - LogStep(33, "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 34: { - LogStep(34, "Wait 1000ms"); + 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::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 35: { - LogStep(35, "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 36: { - LogStep(36, "Turn off light that we turned on"); + 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; @@ -8904,8 +8678,8 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 37: { - LogStep(37, "Check on/off attribute value is false after off command"); + case 22: { + LogStep(22, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -8917,7 +8691,7 @@ class Test_TC_CC_6_2Suite : public TestCommand class Test_TC_CC_6_3Suite : public TestCommand { public: - Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 22, credsIssuerConfig) + Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -8997,6 +8771,7 @@ class Test_TC_CC_6_3Suite : public TestCommand break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -9004,13 +8779,7 @@ class Test_TC_CC_6_3Suite : public TestCommand break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -9018,13 +8787,7 @@ class Test_TC_CC_6_3Suite : public TestCommand break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -9032,16 +8795,11 @@ class Test_TC_CC_6_3Suite : public TestCommand 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)); - } + shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -9049,13 +8807,7 @@ class Test_TC_CC_6_3Suite : public TestCommand break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -9063,32 +8815,8 @@ class Test_TC_CC_6_3Suite : public TestCommand break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } 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)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -9155,119 +8883,123 @@ class Test_TC_CC_6_3Suite : public TestCommand true, chip::NullOptional); } case 6: { - LogStep(6, "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(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, "Wait 500ms"); + 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::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - 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 8: { - LogStep(8, "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(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, "Wait 500ms"); + 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::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - 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 10: { - LogStep(10, "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(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, "Wait 700ms"); + 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::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 700UL; - 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 12: { - LogStep(12, "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(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, "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, - value, 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, "Wait 500ms"); + 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::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - 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 15: { - LogStep(15, "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(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::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in 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, "Wait 500ms"); + 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 = 500UL; - 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 17: { - LogStep(17, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 18: { - LogStep(18, "Wait 500ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); - } - case 20: { - LogStep(20, "Turn off light that we turned on"); + 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; @@ -9275,8 +9007,8 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 21: { - LogStep(21, "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); } @@ -9380,7 +9112,7 @@ class Test_TC_CC_7_2Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 34000U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 36000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 36500U)); } break; case 13: @@ -9393,7 +9125,7 @@ class Test_TC_CC_7_2Suite : public TestCommand uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 34500U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 36000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 36500U)); } break; case 15: @@ -9444,7 +9176,7 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 9500U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7500U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 12500U)); } break; @@ -9457,7 +9189,7 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 9500U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7500U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 12500U)); } break; @@ -10573,16 +10305,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); } @@ -10597,18 +10324,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; } @@ -10632,102 +10352,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; @@ -10735,11 +10426,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: @@ -10750,12 +10440,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; @@ -10763,19 +10451,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)); @@ -10783,25 +10468,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)); @@ -10812,89 +10483,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; @@ -10925,7 +10548,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; @@ -10933,27 +10565,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, @@ -10961,14 +10603,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; @@ -10979,221 +10622,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, @@ -11201,15 +10818,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; @@ -11219,27 +10837,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; @@ -11247,8 +10865,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); } @@ -17848,10 +17466,10 @@ class Test_TC_LVL_4_1Suite : public TestCommand chip::NullOptional); } case 21: { - LogStep(21, "Wait 12s"); + LogStep(21, "Wait 13s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 12000UL; + value.ms = 13000UL; return WaitForMs(kIdentityAlpha, value); } case 22: { @@ -79953,6 +79571,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() {} @@ -79966,6 +79585,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; } @@ -80144,12 +79764,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 7: { @@ -80239,12 +79861,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); } } @@ -80645,6 +80271,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() {} @@ -80660,6 +80288,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; } @@ -80787,12 +80417,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; @@ -81507,12 +81147,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); @@ -81563,12 +81205,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); @@ -82304,6 +81948,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() {} @@ -82319,6 +81964,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; } @@ -82624,12 +82270,14 @@ 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.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; } @@ -82953,6 +82611,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() {} @@ -82963,6 +82623,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; } @@ -83061,13 +82723,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], 85U)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 80U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 115U)); NextTest(); @@ -14601,212 +14601,158 @@ class Test_TC_CC_6_2 : public TestCommandBridge { err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4b.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 = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6(); + err = TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMinMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { - NextTest(); - return; - } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { - NextTest(); - return; - } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10(); - break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 1000ms\n"); - err = TestWait1000ms_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { - NextTest(); - return; - } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4b.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 = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01UpRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds40_7(); break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_8(); break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 1000ms\n"); - err = TestWait1000ms_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); - err = TestWait1000ms_18(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19(); + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { + case 11: + 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 = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x03downRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_11(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4b.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 = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); - err = TestWait1000ms_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); - err = TestWait1000ms_24(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_13(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 1000ms\n"); - err = TestWait1000ms_26(); + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_14(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { + case 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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01upRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_15(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { + case 16: + 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 = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28(); + err = TestAfter10SecondsThSendsMoveColorTemperatureCommandToDutWithMoveMode0x00stopRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_16(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { + case 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 = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_29(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_17(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 1000ms\n"); - err = TestWait1000ms_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { + case 18: + 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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 1000ms\n"); - err = TestWait1000ms_32(); + err = TestAfterAnother2SecondsThReadsColorTemperatureMiredsAttributeFromDut_18(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { + case 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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 1000ms\n"); - err = TestWait1000ms_34(); + err = TestThReadsColorModeAttributeFromDut_19(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { + case 20: + 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 = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35(); + err = TestThReadsEnhancedColorModeAttributeFromDut_20(); break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_36(); + err = TestTurnOffLightThatWeTurnedOn_21(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); break; } @@ -14888,51 +14834,6 @@ class Test_TC_CC_6_2 : public TestCommandBridge { case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 29: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -14946,7 +14847,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 38; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -15080,581 +14981,147 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6() + 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 = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Up Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not 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_7() + CHIP_ERROR + TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01UpRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds40_7() { - 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 TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8() + 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(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not 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 TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10() { - 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 TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10() + CHIP_ERROR + TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x03downRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_11() { - 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); + } - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + 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); + } - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); + 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); + } - NextTest(); - }]; + CHIP_ERROR + TestThSendsMoveColorTemperatureCommandToDutWithMoveMode0x01upRateColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds20_15() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - return CHIP_NO_ERROR; + 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); } - CHIP_ERROR TestWait1000ms_11() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_17() { - 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 TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12() + CHIP_ERROR TestAfterAnother2SecondsThReadsColorTemperatureMiredsAttributeFromDut_18() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_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 = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Down Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - 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 TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_16() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_18() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Up Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Stop Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_22() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull ColorTemperatureValue; - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - { - ColorTemperatureValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_24() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); - } - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_26() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); - } - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Down Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_29() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:20U]; - params.colorTemperatureMinimumMireds = [ColorTempPhysicalMinMiredsValue copy]; - params.colorTemperatureMaximumMireds = [ColorTempPhysicalMaxMiredsValue copy]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorTemperatureWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColorTemperature command to DUT with MoveMode = Stop Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_30() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull ColorTemperatureMoveModeStop; - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - { - ColorTemperatureMoveModeStop = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_32() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureMoveModeStop)); - } - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - 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_34() + CHIP_ERROR TestThReadsColorModeAttributeFromDut_19() { - 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 TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35() + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_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(@"Read current color temprature attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTemperatureValue)); - } - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - 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_36() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -15671,7 +15138,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -15777,108 +15244,121 @@ class Test_TC_CC_6_3 : public TestCommandBridge { err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4c.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 = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_6(); + err = TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMinMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 500ms\n"); - err = TestWait500ms_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 = TestThSendsStepColorTemperatureCommandToDutWithStepMode0x01UpStepSizeColorTempPhysicalMaxMiredsColorTempPhysicalMinMireds2AndTransitionTime20020s_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : 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 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 = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_8(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 500ms\n"); - err = TestWait500ms_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 = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : 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 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 = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_10(); + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 700ms\n"); - err = TestWait700ms_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 = TestThSendsStepColorTemperatureCommandToDutWithStepMode0x03DownStepSizeColorTempPhysicalMaxMiredsColorTempPhysicalMinMiredsAndTransitionTime20020s_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : 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 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 = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_12(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && 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 = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_13(); + err = TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 500ms\n"); - err = TestWait500ms_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : 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 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 = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 500ms\n"); - err = TestWait500ms_16(); + err = TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_14(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.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 = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 500ms\n"); - err = TestWait500ms_18(); + err = TestThReadsColorModeAttributeFromDut_15(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4c.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 = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_19(); + err = TestThReadsEnhancedColorModeAttributeFromDut_16(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : 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_20(); + err = TestTurnOffLightThatWeTurnedOn_17(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : 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_21(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18(); break; } @@ -15948,15 +15428,6 @@ class Test_TC_CC_6_3 : 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; } // Go on to the next test. @@ -15970,7 +15441,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 22; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -16046,183 +15517,13 @@ class Test_TC_CC_6_3 : public TestCommandBridge { } NextTest(); - }]; - - return CHIP_NO_ERROR; - } - NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster - readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); - { - ColorTempPhysicalMaxMiredsValue = value; - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_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_ERROR TestWait500ms_7() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_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_ERROR TestWait500ms_9() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_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_ERROR TestWait700ms_11() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 700UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_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)); - - NextTest(); - }]; + }]; return CHIP_NO_ERROR; } + NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_13() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16230,34 +15531,26 @@ class Test_TC_CC_6_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = [NSNumber numberWithUnsignedShort: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); + [cluster + readAttributeColorTempPhysicalMaxMiredsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTempPhysicalMaxMireds attribute from DUT. Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("colorTempPhysicalMaxMireds", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTempPhysicalMaxMireds", [value unsignedShortValue], 65279U)); + { + ColorTempPhysicalMaxMiredsValue = value; + } - return CHIP_NO_ERROR; - } + NextTest(); + }]; - CHIP_ERROR TestWait500ms_14() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; - return WaitForMs("alpha", value); + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -16266,13 +15559,15 @@ class Test_TC_CC_6_3 : public TestCommandBridge { 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); + NSLog(@"TH reads ColorTemperatureMireds 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("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); + VerifyOrReturn( + CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); NextTest(); }]; @@ -16280,74 +15575,116 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_16() + CHIP_ERROR + TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMiredsColorTempPhysicalMinMiredsColorTempPhysicalMaxMireds2AndTransitionTime0Immediately_6() { - 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_17() + 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 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_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); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_9() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestWait500ms_18() + CHIP_ERROR TestAfterAnother5SecondsThReadsColorTemperatureMiredsAttributeFromDut_10() { - 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_19() + CHIP_ERROR + TestThSendsStepColorTemperatureCommandToDutWithStepMode0x03DownStepSizeColorTempPhysicalMaxMiredsColorTempPhysicalMinMiredsAndTransitionTime20020s_11() { - 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); + } - [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads ColorTemperatureMireds attribute from DUT several times Error: %@", err); + CHIP_ERROR TestAfter10SecondsThReadsColorTemperatureMiredsAttributeFromDut_12() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + 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); + } - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 65279U)); + 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); + } - NextTest(); - }]; + CHIP_ERROR TestThReadsColorModeAttributeFromDut_15() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } - return CHIP_NO_ERROR; + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_16() + { + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_20() + 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)); @@ -16357,7 +15694,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -17921,11 +17258,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) @@ -17959,297 +17291,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(); - 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 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 = TestThReadsCurrentYAttributeFromDut_24(); + err = TestAfter10SecondsThSendsStopMoveStepCommandToDut_23(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.A0004 && CC.S.C47.Rsp && CC.S.F03")) { - NextTest(); - return; - } - err = TestThReadsCurrentYAttributeFromDut_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends MoveColorTemperature command to DUT\n"); - if (ShouldSkip("CC.S.C4b.Rsp && CC.S.F04")) { - NextTest(); - return; - } - err = TestThSendsMoveColorTemperatureCommandToDut_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); - err = TestWait1000ms_27(); - break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads ColorTemperatureMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.A0007 && CC.S.C4b.Rsp && CC.S.F04")) { - NextTest(); - return; - } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_28(); - break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F04")) { + case 24: + 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 = TestThSendsStopMoveStepCommandToDut_29(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_24(); 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")) { + case 25: + 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 = TestThReadsColorTemperatureMiredsAttributeFromDut_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 500ms\n"); - err = TestWait500ms_31(); + err = TestAfterAnother2SecondsThReadsColorTemperatureMiredsAttributeFromDut_25(); break; - case 32: + case 26: 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")) { + " ***** 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 = TestThSendsEnhancedMoveHueCommandToDut_33(); + err = TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue20000Direction0x00ShortestDistanceAndTransitionTime0Immediately_26(); 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")) { + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 100ms\n"); + err = TestWait100ms_27(); + break; + case 28: + 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 = TestThReadsEnhancedCurrentHueAttributeFromDut_34(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x01UpAndRate500UnitsS_28(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH sends StopMoveStep command to DUT\n"); - if (ShouldSkip("CC.S.C47.Rsp && CC.S.F01")) { + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Wait 10s\n"); + err = TestWait10s_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends StopMoveStep command to DUT\n"); + if (ShouldSkip("CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_35(); + err = TestThSendsStopMoveStepCommandToDut_30(); 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")) { + case 31: + 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_36(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_31(); 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; } @@ -18356,336 +17653,48 @@ class Test_TC_CC_8_1 : public TestCommandBridge { 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(); - }]; + 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 @@ -18693,60 +17702,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 @@ -18754,16 +17741,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)); @@ -18773,14 +17761,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 @@ -18788,45 +17776,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 @@ -18844,73 +17818,12 @@ class Test_TC_CC_8_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); NextTest(); - }]; - - 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); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_24() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -18918,19 +17831,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(); }]; @@ -18938,7 +17845,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 @@ -18946,19 +17860,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(); }]; @@ -18966,7 +17874,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 @@ -18974,38 +17882,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 @@ -19013,22 +17916,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 @@ -19050,9 +17963,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 @@ -19060,16 +17973,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(); @@ -19078,14 +17990,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 @@ -19093,27 +18005,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 @@ -19121,25 +18029,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 @@ -19147,22 +18166,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 @@ -19186,7 +18216,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 @@ -19199,9 +18229,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; } @@ -19212,14 +18241,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 @@ -19232,14 +18261,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(); }]; @@ -19247,14 +18271,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)); @@ -19264,7 +18288,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]; @@ -28871,8 +27895,8 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { err = TestThReadsCurrentLevelAttributeFromDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 12s\n"); - err = TestWait12s_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"); @@ -29410,10 +28434,10 @@ class Test_TC_LVL_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait12s_21() + CHIP_ERROR TestWait13s_21() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 12000UL; + value.ms = 13000UL; return WaitForMs("alpha", value); }