diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 861d01fcbf95c1..7cba75b087b78c 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -261,15 +261,15 @@ PICS: - label: "Does the device implement receiving the MoveToColorTemperature command?" - id: CC.S.C0A.Rsp + id: CC.S.C0a.Rsp - label: "Does the device implement receiving the MoveColorTemperature command?" - id: CC.S.C4B.Rsp + id: CC.S.C4b.Rsp - label: "Does the device implement receiving the StepColorTemperature command?" - id: CC.S.C4C.Rsp + id: CC.S.C4c.Rsp - label: "Does the device implement receiving the EnhancedMoveToHue command?" diff --git a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml index 59194cd37a8eff..ef12fae26a6a2a 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_1_1.yaml @@ -80,19 +80,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml index 95452eb7f55c91..b9db40f6d33ab9 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_1_12.yaml @@ -72,19 +72,18 @@ tests: constraints: type: list contains: [1] - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml index 1c3bf523b5132b..1eb85ffb059845 100644 --- a/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_APBSC_1_10.yaml @@ -99,19 +99,18 @@ tests: value: [] constraints: type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml index 7b9eecd1ced204..620afffd4ea55f 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_1_3.yaml @@ -97,19 +97,18 @@ tests: constraints: type: list contains: [3] - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml index a8a8ab2bcd0571..81ace755741192 100644 --- a/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_AUDIOOUTPUT_1_8.yaml @@ -83,19 +83,18 @@ tests: value: [] constraints: type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml index f6ddb804653e6d..0c4111d8f07561 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_1_1.yaml @@ -70,19 +70,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index 6abbdd4c7e7d7a..208e9aed9c203b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -25,6 +25,11 @@ config: endpoint: 0 tests: + - label: "Precondition: Reset DUT_CE to factory defaults" + verification: | + verification step to be updated. + disabled: true + - label: "TH_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml index 18f09155a899d8..3b8159c6a97805 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml @@ -43,6 +43,24 @@ config: defaultValue: "MT:-24J0AFN00I.0648G00" tests: + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index 257469ce254362..61d435c12c1df7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -26,6 +26,11 @@ config: endpoint: 0 tests: + - label: "Precondition: Reset DUT_CE to factory defaults" + verification: | + verification step to be updated. + disabled: true + - label: "TH_CR1 starts a commissioning process with DUT_CE" PICS: CADMIN.S verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml index 63da286de8f4cd..5b1a16ccf5cee2 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml @@ -26,6 +26,11 @@ config: endpoint: 0 tests: + - label: "Precondition: Reset DUT_CE to factory defaults" + verification: | + verification step to be updated. + disabled: true + - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | 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 0ec6d302626d05..907bc3ee653459 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 @@ -41,6 +41,24 @@ config: defaultValue: "MT:-24J0AFN00KA0648G00" tests: + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 starts a commissioning process with DUT_CE" identity: "alpha" cluster: "DelayCommands" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml index 155a7515755a8e..7054156a4850f8 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_14.yaml @@ -26,6 +26,11 @@ config: endpoint: 0 tests: + - label: "Precondition: Reset DUT_CE to factory defaults" + verification: | + verification step to be updated. + disabled: true + - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 3c6e8d6c0f794a..8f3cebd67c8b84 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CE to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index de1771e913f767..85eb8c8d834f26 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CE to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml index 15f161f42b333a..ec3887de5ff1d7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CR1 to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml index f27a2d4cae3657..dda7a234a0b3c0 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CR1 to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml index 3fae0f0baf615f..0539f54286d0ca 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_19.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CE to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index 6220ada217989b..2c9ea05a85824c 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -25,6 +25,11 @@ config: endpoint: 0 tests: + - label: "Precondition: Reset DUT_CE to factory defaults" + verification: | + verification step to be updated. + disabled: true + - label: "TH_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml index cd70fef58370a9..ef16e4bb06c5ec 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_20.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CE to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml index 27996db70ee23f..a56a83466c2d10 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_21.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CE to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml index fdd103a0a8c3a2..c618c42d7720a7 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml @@ -26,7 +26,7 @@ config: endpoint: 0 tests: - - label: "Reset DUT_CE to factory defaults" + - label: "Precondition: Reset DUT_CE to factory defaults" verification: | verification step to be updated. disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_23.yaml index dfded257848895..7780548aa0f1e8 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 @@ -26,12 +26,12 @@ config: endpoint: 0 tests: - - label: "Factory Reset the DUT_CE" + - label: "Precondition: Reset Devices to factory defaults" PICS: PICS_SDK_CI_ONLY cluster: "SystemCommands" command: "FactoryReset" - - label: "Factory Reset the DUT_CE" + - label: "Precondition: Reset Devices to factory defaults" verification: | Not implemented in YAML cluster: "LogCommands" @@ -40,7 +40,7 @@ tests: arguments: values: - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" + value: "Factory Reset the DUT and enter 'y' after success" - name: "expectedValue" value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml index 2c1872a917de08..275e969116da41 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 @@ -26,12 +26,12 @@ config: endpoint: 0 tests: - - label: "Factory Reset the DUT_CE" + - label: "Precondition: Reset Devices to factory defaults" cluster: "SystemCommands" PICS: PICS_SDK_CI_ONLY command: "FactoryReset" - - label: "Factory Reset the DUT_CE" + - label: "Precondition: Reset Devices to factory defaults" verification: | Not implemented in YAML cluster: "LogCommands" @@ -40,7 +40,7 @@ tests: arguments: values: - name: "message" - value: "Please reboot the DUT and enter 'y' after DUT starts" + value: "Factory Reset the DUT and enter 'y' after success" - name: "expectedValue" value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index ec7483aee424eb..769ee2ff3374a5 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 @@ -32,6 +32,24 @@ config: defaultValue: "MT:0000000000I31506010" # This value needs to be generated automatically tests: + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 4f3d8eecf1dd84..4ee2d08ee9743e 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -32,6 +32,24 @@ config: defaultValue: "MT:-24J0AFN00KA0648G00" tests: + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" 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 ac1efbf6eeddcf..b06946cf447c43 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 @@ -40,6 +40,24 @@ config: defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index 21a1cf069f94cd..4015bf778f5759 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -40,6 +40,24 @@ config: defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically tests: + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index bbb8cf37fc6c49..6a64acc1da347a 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -26,6 +26,11 @@ config: endpoint: 0 tests: + - label: "Precondition: Reset DUT_CE to factory defaults" + verification: | + verification step to be updated. + disabled: true + - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml index 1bdadd836531ab..d382c999f8a429 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_8.yaml @@ -26,6 +26,11 @@ config: endpoint: 0 tests: + - label: "Precondition: Reset DUT_CE to factory defaults" + verification: | + verification step to be updated. + disabled: true + - label: "DUT_CR1 starts a commissioning process with TH_CE" PICS: CADMIN.C verification: | diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml index 922f65a58e1665..1811e183848d25 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 @@ -43,6 +43,24 @@ config: defaultValue: "MT:-24J0AFN00I.0648G00" tests: + - label: "Precondition: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Precondition: Reset Devices to factory defaults" + verification: | + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 starts a commissioning process with DUT_CE" cluster: "DelayCommands" command: "WaitForCommissionee" diff --git a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml index 1e46f0fa6f3e66..7be4ab23fed5fc 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_1_1.yaml @@ -12,10 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.1.1. [TC-CC-1.1] Global attributes with server as DUT - -PICS: - - CC.S +name: 25.1.1. [TC-CC-1.1] Global attributes with server as DUT config: nodeId: 0x12344321 @@ -57,13 +54,363 @@ tests: type: list contains: [8, 15, 16385, 16394, 65528, 65529, 65531, 65532, 65533] - - label: "Read the global attribute: AcceptedCommandList" + - label: "Read the optional attribute(CurrentHue) in AttributeList" + PICS: CC.S.A0000 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0] + + - label: "Read the optional attribute(CurrentSaturation) in AttributeList" + PICS: CC.S.A0001 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [1] + + - label: "Read the optional attribute(RemainingTime) in AttributeList" + PICS: CC.S.A0002 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] + + - label: "Read the optional attribute(CurrentX) in AttributeList" + PICS: CC.S.A0003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3] + + - label: "Read the optional attribute(CurrentY) in AttributeList" + PICS: CC.S.A0004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: "Read the optional attribute(DriftCompensation) in AttributeList" + PICS: CC.S.A0005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: "Read the optional attribute(CompensationText) in AttributeList" + PICS: CC.S.A0006 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6] + + - label: + "Read the optional attribute(ColorTemperatureMireds) in AttributeList" + PICS: CC.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [7] + + - label: "Read the optional attribute(EnhancedCurrentHue) in AttributeList" + PICS: CC.S.A4000 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16384] + + - label: "Read the optional attribute(ColorLoopActive) in AttributeList" + PICS: CC.S.A4002 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16386] + + - label: "Read the optional attribute(ColorLoopDirection) in AttributeList" + PICS: CC.S.A4003 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16387] + + - label: "Read the optional attribute(ColorLoopTime) in AttributeList" + PICS: CC.S.A4004 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16388] + + - label: + "Read the optional attribute(ColorLoopStartEnhancedHue) in + AttributeList" + PICS: CC.S.A4005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16389] + + - label: + "Read the optional attribute(ColorLoopStoredEnhancedHue) in + AttributeList" + PICS: CC.S.A4006 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16390] + + - label: + "Read the optional attribute(ColorTempPhysicalMinMireds) in + AttributeList" + PICS: CC.S.A400b + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16395] + + - label: + "Read the optional attribute(ColorTempPhysicalMaxMireds) in + AttributeList" + PICS: CC.S.A400c + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16396] + + - label: + "Read the optional attribute(CoupleColorTempToLevelMinMireds) in + AttributeList" + PICS: CC.S.A400d + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16397] + + - label: + "Read the optional attribute(StartUpColorTemperatureMireds) in + AttributeList" + PICS: CC.S.A4010 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [16400] + + - label: "Read the optional command(MoveToHue) in AcceptedCommandList" + PICS: CC.S.C00.Rsp command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [] + contains: [0] + + - label: "Read the optional command(MoveHue) in AcceptedCommandList" + PICS: CC.S.C01.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [1] + + - label: "Read the optional command(StepHue) in AcceptedCommandList" + PICS: CC.S.C02.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [2] + + - label: + "Read the optional command(MoveToSaturation) in AcceptedCommandList" + PICS: CC.S.C03.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [3] + + - label: "Read the optional command(MoveSaturation) in AcceptedCommandList" + PICS: CC.S.C04.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [4] + + - label: "Read the optional command(StepSaturation) in AcceptedCommandList" + PICS: CC.S.C05.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [5] + + - label: + "Read the optional command(MoveToHueAndSaturation) in + AcceptedCommandList" + PICS: CC.S.C06.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [6] + + - label: "Read the optional command(MoveToColor) in AcceptedCommandList" + PICS: CC.S.C07.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [7] + + - label: "Read the optional command(MoveColor) in AcceptedCommandList" + PICS: CC.S.C08.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [8] + + - label: "Read the optional command(StepColor) in AcceptedCommandList" + PICS: CC.S.C09.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [9] + + - label: + "Read the optional command(MoveToColorTemperature) in + AcceptedCommandList" + PICS: CC.S.C0a.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [10] + + - label: + "Read the optional command(EnhancedMoveToHue) in AcceptedCommandList" + PICS: CC.S.C40.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [64] + + - label: "Read the optional command(EnhancedMoveHue) in AcceptedCommandList" + PICS: CC.S.C41.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [65] + + - label: "Read the optional command(EnhancedStepHue) in AcceptedCommandList" + PICS: CC.S.C42.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [66] + + - label: + "Read the optional command(EnhancedMoveToHueAndSaturation) in + AcceptedCommandList" + PICS: CC.S.C43.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [67] + + - label: "Read the optional command(ColorLoopSet) in AcceptedCommandList" + PICS: CC.S.C44.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [68] + + - label: "Read the optional command(StopMoveStep) in AcceptedCommandList" + PICS: CC.S.C47.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [71] + + - label: + "Read the optional command(MoveColorTemperature) in + AcceptedCommandList" + PICS: CC.S.C4b.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [75] + + - label: + "Read the optional command(StepColorTemperature) in + AcceptedCommandList" + PICS: CC.S.C4c.Rsp + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [76] - label: "Read the global attribute: GeneratedCommandList" command: "readAttribute" @@ -72,19 +419,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index d2b1de244feda2..a9b196b8938003 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.1. [TC-CC-2.1] Attributes with server as DUT +name: 25.2.1. [TC-CC-2.1] Attributes with server as DUT PICS: - CC.S diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml index eef0d2b120bd6e..a22b906e0b6a99 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.2. [TC-CC-3.1] Hue MoveTo functionality with server as DUT +name: 25.3.1. [TC-CC-3.1] Hue MoveTo functionality with server as DUT PICS: - CC.S @@ -22,18 +22,6 @@ config: cluster: "Color Control" endpoint: 1 timeout: 150 - hueShortestDistance: - type: int8u - defaultValue: 150 - hueLongestDistance: - type: int8u - defaultValue: 200 - hueDirectionUp: - type: int8u - defaultValue: 250 - hueDirectionDown: - type: int8u - defaultValue: 170 tests: - label: "Wait for the commissioned device to be retrieved" @@ -44,25 +32,86 @@ tests: - name: "nodeId" value: nodeId - - label: "Turn on light for color control tests" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH sends On command to DUT" PICS: OO.S.C01.Rsp cluster: "On/Off" - command: "on" + command: "On" - - label: "Check on/off attribute value is true after on command" - cluster: "On/Off" + - label: + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 + (shortest distance) and TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" + arguments: + values: + - name: "hue" + value: 60 + - 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 MoveToHue command to DUT with Hue=120, Direction=0x00 + (shortest distance) and TransitionTime=300 (30s)" + PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" + arguments: + values: + - name: "hue" + value: 120 + - name: "Direction" + value: 0 + - name: "TransitionTime" + value: 300 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" - attribute: "OnOff" - PICS: OO.S.A0000 + attribute: "CurrentHue" response: - value: 1 + constraints: + minValue: 68 + maxValue: 98 - - label: "TH writes 0 to the Options attribute" - PICS: CC.S.F00 && CC.S.A000f - command: "writeAttribute" - attribute: "Options" + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" arguments: - value: 0 + values: + - name: "ms" + value: 10000 - label: "TH reads CurrentHue attribute from DUT" PICS: CC.S.F00 && CC.S.A0000 @@ -70,52 +119,74 @@ tests: attribute: "CurrentHue" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 85 + maxValue: 115 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + value: 120 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + value: 120 - label: - "TH sends MoveToHue command to DUT another Hue with Direction Shortest - distance and TransitionTime 300" + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 + (Shortest distance) and TransitionTime=0 (immediately)" PICS: CC.S.F00 && CC.S.C00.Rsp command: "MoveToHue" arguments: values: - name: "hue" - value: hueShortestDistance + value: 60 - name: "Direction" value: 0 - name: "TransitionTime" - value: 300 + value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 30s" + - label: "Wait 100ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 30000 - - - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp - command: "readAttribute" - attribute: "CurrentHue" - response: - value: hueShortestDistance + value: 100 - label: - "TH sends MoveToHue command to DUT another Hue with Direction Longest - distance and TransitionTime 300" - command: "MoveToHue" + "TH sends MoveToHue command to DUT with Hue=135, Direction=0x01 + (longest distance) and TransitionTime=300 (30s)" PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" arguments: values: - name: "hue" - value: hueLongestDistance + value: 135 - name: "Direction" value: 1 - name: "TransitionTime" @@ -125,30 +196,107 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 30s" + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 0 + maxValue: 15 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 166 + maxValue: 224 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 135 + maxValue: 150 + + - label: "Wait 5s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 30000 + value: 5000 - - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT." - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: - value: hueLongestDistance + value: 135 - label: - "TH sends MoveToHue command to DUT another Hue with Direction Up and - TransitionTime 300" + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 + (shortest distance) and TransitionTime=0 (immediately)." + PICS: CC.S.F00 && CC.S.C00.Rsp command: "MoveToHue" + arguments: + values: + - name: "hue" + value: 60 + - 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 MoveToHue command to DUT with Hue=120, Direction=0x02 (up) + and TransitionTime=300 (30s)" PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" arguments: values: - name: "hue" - value: hueDirectionUp + value: 120 - name: "Direction" value: 2 - name: "TransitionTime" @@ -158,30 +306,107 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 30s" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 30000 + value: 10000 - - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: - value: hueDirectionUp + constraints: + minValue: 68 + maxValue: 92 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 85 + maxValue: 115 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 105 + maxValue: 120 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + value: 120 - label: - "TH sends MoveToHue command to DUT another Hue with Direction Down and - TransitionTime 300" + "TH sends MoveToHue command to DUT with Hue=120, Direction=0x00 + (shortest distance) and TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C00.Rsp command: "MoveToHue" + arguments: + values: + - name: "hue" + value: 120 + - 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 MoveToHue command to DUT with Hue=60, Direction=0x03 (down) + and TransitionTime=300 (30s)" PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" arguments: values: - name: "hue" - value: hueDirectionDown + value: 60 - name: "Direction" value: 3 - name: "TransitionTime" @@ -191,25 +416,94 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 30s" + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 85 + maxValue: 115 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 68 + maxValue: 92 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 60 + maxValue: 72 + + - label: "Wait 5s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 30000 + value: 5000 - - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: - value: hueDirectionDown + value: 60 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 3 - 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_3_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml index c221342b349ce9..5ec62e14fd1454 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_2.yaml @@ -12,18 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.3. [TC-CC-3.2] Hue Move functionality with server as DUT - -PICS: - - CC.S +name: 25.3.2. [TC-CC-3.2] Hue Move functionality with server as DUT config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - RateConfigValue: - type: enum8 - defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -34,19 +28,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.F00 && CC.S.A000f command: "writeAttribute" @@ -54,17 +35,40 @@ tests: arguments: value: 0 - - label: "TH reads CurrentHue attribute from DUT" - command: "readAttribute" - PICS: CC.S.F00 && CC.S.A0000 - attribute: "CurrentHue" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" - - label: "TH sends MoveHue command to DUT with MoveMode Up" + - 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.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -72,67 +76,57 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 3000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 3000 + value: 10000 - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 245 + maxValue: 255 - - label: "Wait 2000" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 2000 + value: 10000 - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 35 + maxValue: 55 - - label: "Wait 3000" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 3000 - - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp - command: "readAttribute" - attribute: "CurrentHue" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + value: 10000 - - label: "TH sends MoveHue command to DUT with MoveMode Stop" + - label: + "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 + (units/s)" PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -140,47 +134,66 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + saveAs: CurrentHueValueStep2f + constraints: + minValue: 80 + maxValue: 110 + + - label: "Wait 2s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 2000 - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: - saveAs: CurrentHueValue - constraints: - type: int8u - minValue: 0 - maxValue: 254 + value: CurrentHueValueStep2f + + - label: + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 + (shortest distance) and TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" + arguments: + values: + - name: "hue" + value: 60 + - name: "Direction" + value: 0 + - name: "TransitionTime" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "Wait 1000ms" + - label: "Wait 100ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 100 - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp - command: "readAttribute" - attribute: "CurrentHue" - response: - value: CurrentHueValue - - - label: "TH sends MoveHue command to DUT with MoveMode Down" + - label: + "TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 + (units/s)" PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -188,67 +201,57 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: int8u minValue: 0 - maxValue: 254 + maxValue: 20 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 180 + maxValue: 240 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 - - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp - command: "readAttribute" - attribute: "CurrentHue" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + value: 10000 - - label: "TH sends MoveHue command to DUT with MoveMode Stop" + - label: + "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 + (units/s)" PICS: CC.S.F00 && CC.S.C01.Rsp command: "MoveHue" arguments: @@ -256,50 +259,59 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: - saveAs: CurrentHueValueAfterStopmode + saveAs: CurrentHueValueStep3f constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 140 + maxValue: 180 - - label: "Wait 1000ms" + - label: "Wait 2s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 2000 - - label: "TH reads CurrentHue attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: - value: CurrentHueValueAfterStopmode + value: CurrentHueValueStep3f + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 3 - 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_3_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml index 72c82a0d28d613..f34c9bf733dc81 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_3.yaml @@ -12,18 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.4. [TC-CC-3.3] Hue Step functionality with server as DUT - -PICS: - - CC.S +name: 25.3.3. [TC-CC-3.3] Hue Step functionality with server as DUT config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - StepSizeConfigValue: - type: int8u - defaultValue: 5 tests: - label: "Wait for the commissioned device to be retrieved" @@ -34,19 +28,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.F00 && CC.S.A000f command: "writeAttribute" @@ -54,17 +35,40 @@ tests: arguments: value: 0 - - label: "TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 - command: "readAttribute" - attribute: "CurrentHue" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + - 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: "TH sends StepHue command to DUT with StepMode Up" + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: + "TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 + and TransitionTime=200 (20s)" PICS: CC.S.F00 && CC.S.C02.Rsp command: "StepHue" arguments: @@ -72,34 +76,92 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: StepSizeConfigValue + value: 60 - name: "TransitionTime" - value: 5 + value: 200 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - #Delay step is necessary to let the attribute value change over time - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: int8u - minValue: 5 - maxValue: 254 + minValue: 215 + maxValue: 245 - - label: "TH sends StepHue command to DUT with StepMode Down" + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 0 + maxValue: 10 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + value: 5 + + - label: + "TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 + (shortest distance) and TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C00.Rsp + command: "MoveToHue" + arguments: + values: + - name: "hue" + value: 50 + - 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 StepHue command to DUT with StepMode=0x03 (down), + StepSize=60 and TransitionTime=200 (20s)" PICS: CC.S.F00 && CC.S.C02.Rsp command: "StepHue" arguments: @@ -107,36 +169,85 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: StepSizeConfigValue + value: 60 - name: "TransitionTime" - value: 5 + value: 200 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" - PICS: CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: constraints: - type: int8u + minValue: 17 + maxValue: 23 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 245 + maxValue: 255 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + value: 245 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 - maxValue: 249 + maxValue: 3 - 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_4_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_1.yaml index 2a15655ec09676..758af9c9ac5e38 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 @@ -12,10 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.5. [TC-CC-4.1] Saturation MoveTo functionality with server as DUT - -PICS: - - CC.S +name: 25.3.5. [TC-CC-4.1] Saturation MoveTo functionality with server as DUT config: nodeId: 0x12344321 @@ -34,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.F00 && CC.S.A000f command: "writeAttribute" @@ -54,54 +38,139 @@ tests: arguments: value: 0 - - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" - - label: "TH sends MoveToSaturation command to DUT" + - label: + "TH sends MoveToSaturation command to DUT with Saturation=60 and + TransitionTime=0 (immediately)" PICS: CC.S.F00 && CC.S.C03.Rsp command: "MoveToSaturation" arguments: values: - name: "Saturation" - value: SaturationConfigValue + value: 60 - name: "TransitionTime" - value: 10 + value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1500ms" + - label: "Wait 100ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1500 + value: 100 - label: - "Over TransitionTime, TH reads CurrentSaturation attribute from DUT." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp + "TH sends MoveToSaturation command to DUT with Saturation=120 and + TransitionTime=300 (30s)" + PICS: CC.S.F00 && CC.S.C03.Rsp + command: "MoveToSaturation" + arguments: + values: + - name: "Saturation" + value: 120 + - name: "TransitionTime" + value: 300 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - value: SaturationConfigValue constraints: - type: int8u + minValue: 68 + maxValue: 92 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 85 + maxValue: 115 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 110 + maxValue: 120 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 120 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 - maxValue: 254 + maxValue: 3 - 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_4_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml index 46f1b1c190c72d..4f275574c0f43f 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml @@ -12,18 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.6. [TC-CC-4.2] Saturation Move functionality with server as DUT - -PICS: - - CC.S +name: 25.3.6. [TC-CC-4.2] Saturation Move functionality with server as DUT config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - RateConfigValue: - type: int8u - defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -34,19 +28,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.F00 && CC.S.A000f command: "writeAttribute" @@ -54,17 +35,38 @@ tests: arguments: value: 0 - - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" - - label: "TH sends MoveSaturation command to DUT with MoveMode Up" + - label: + "TH sends MoveToSaturation command to DUT with Saturation=60 and + TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C03.Rsp + command: "MoveToSaturation" + arguments: + values: + - name: "Saturation" + value: 150 + - 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 MoveSaturation command to DUT with MoveMode=0x01 (up) and + Rate=5 (units/s)" command: "MoveSaturation" PICS: CC.S.F00 && CC.S.C04.Rsp arguments: @@ -72,320 +74,267 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentSaturation attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 170 + maxValue: 230 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentSaturation attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: int8u - minValue: 0 + minValue: 235 maxValue: 254 - - label: "Wait 1000ms" + - label: "Wait 5s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 5000 - - label: "TH reads CurrentSaturation attribute from DUT several times" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + value: 254 - - label: "TH sends MoveSaturation command to DUT with MoveMode Down" - PICS: CC.S.F00 && CC.S.C04.Rsp + - label: + "TH sends MoveToSaturation command to DUT with Saturation=120 and + TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C03.Rsp + command: "MoveToSaturation" + arguments: + values: + - name: "Saturation" + value: 120 + - 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 MoveSaturation command to DUT with MoveMode=0x03 (down) and + Rate=5 (units/s)" command: "MoveSaturation" + PICS: CC.S.F00 && CC.S.C04.Rsp arguments: values: - name: "MoveMode" value: 3 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 60 + maxValue: 80 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 5 + maxValue: 35 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: int8u minValue: 0 - maxValue: 254 + maxValue: 10 - label: - "TH sends MoveSaturation command to DUT with MoveMode Up to the - Maximum allowed Saturation" - PICS: CC.S.F00 && CC.S.C04.Rsp - command: "MoveSaturation" + "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: "Saturation" + value: 150 + - name: "TransitionTime" + value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 100ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 - - - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 + value: 100 - label: - "TH sends MoveSaturation command to DUT with MoveMode Stop before - Saturation reaches the Maximum allowed." + "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: "MoveMode" - value: 0 + value: 1 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads CurrentSaturation attribute from DUT." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - saveAs: CurrentSaturationStep4d constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: "CurrentSaturation value Stops incrementing" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp - command: "readAttribute" - attribute: "CurrentSaturation" - response: - value: CurrentSaturationStep4d + minValue: 170 + maxValue: 230 - label: - "TH sends MoveSaturation command to DUT with MoveMode Down to the - Minimum allowed Saturation" - PICS: CC.S.F00 && CC.S.C04.Rsp + "TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and + Rate=5 (units/s)" command: "MoveSaturation" + PICS: CC.S.F00 && CC.S.C04.Rsp arguments: values: - name: "MoveMode" - value: 3 + value: 0 - name: "Rate" - value: RateConfigValue + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: "TH reads CurrentSaturation attribute from DUT several times." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - saveAs: CurrentSaturationStep5b + saveAs: CurrentSaturationValueStep4e constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 170 + maxValue: 230 - - 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 several times." - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - constraints: - type: int8u - minValue: 0 - maxValue: CurrentSaturationStep5b + value: CurrentSaturationValueStep4e - - label: - "TH sends MoveSaturation command to DUT with MoveMode Stop before - Saturation reaches the Minimum allowed" - PICS: CC.S.F00 && CC.S.C04.Rsp - command: "MoveSaturation" - arguments: - values: - - name: "MoveMode" - value: 0 - - name: "Rate" - value: RateConfigValue - - name: "OptionsMask" - value: 0 - - name: "OptionsOverride" - value: 0 - - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 command: "readAttribute" - attribute: "CurrentSaturation" + attribute: "ColorMode" response: - saveAs: CurrentSaturationStep5d constraints: - type: int8u minValue: 0 - maxValue: 254 + maxValue: 2 - - label: "Wait 1000ms" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 1000 - - - label: "CurrentSaturation value Stops decrementing" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 command: "readAttribute" - attribute: "CurrentSaturation" + attribute: "ColorMode" response: - value: CurrentSaturationStep5d + constraints: + minValue: 0 + maxValue: 3 - label: "Turn off light that we turned on" PICS: OO.S.C00.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml index 73643d4f595741..e7b72f1ef8184b 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_3.yaml @@ -12,18 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.7. [TC-CC-4.3] Saturation Step functionality with server as DUT - -PICS: - - CC.S +name: 25.3.7. [TC-CC-4.3] Saturation Step functionality with server as DUT config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - StepSizeConfigValue: - type: int8u - defaultValue: 15 tests: - label: "Wait for the commissioned device to be retrieved" @@ -34,25 +28,84 @@ tests: - name: "nodeId" value: nodeId - - label: "Turn on light for color control tests" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.F00 && CC.S.A000f + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH sends On command to DUT" PICS: OO.S.C01.Rsp cluster: "On/Off" - command: "on" + command: "On" - - label: "Check on/off attribute value is true after on command" - cluster: "On/Off" + - label: + "TH sends MoveToSaturation command to DUT with Saturation=200 and + TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C03.Rsp + command: "MoveToSaturation" + arguments: + values: + - name: "Saturation" + value: 200 + - 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 StepSaturation command to DUT with StepMode=0x01 (up), + StepSize=40 and TransitionTime=200 (20s)" + PICS: CC.S.F00 && CC.S.C05.Rsp + command: "StepSaturation" + arguments: + values: + - name: "StepMode" + value: 1 + - name: "StepSize" + value: 40 + - name: "TransitionTime" + value: 200 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" - attribute: "OnOff" - PICS: OO.S.A0000 + attribute: "CurrentSaturation" response: - value: 1 + constraints: + minValue: 210 + maxValue: 230 - - label: "TH writes 0 to the Options attribute" - PICS: CC.S.F00 && CC.S.A000f - command: "writeAttribute" - attribute: "Options" + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" arguments: - value: 0 + values: + - name: "ms" + value: 10000 - label: "TH reads CurrentSaturation attribute from DUT" PICS: CC.S.F00 && CC.S.A0001 @@ -60,11 +113,27 @@ tests: attribute: "CurrentSaturation" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 230 + maxValue: 240 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 240 - - label: "TH sends StepSaturation command to DUT with StepMode Up" + - label: + "TH sends StepSaturation command to DUT with StepMode=0x01 (up), + StepSize=20 and TransitionTime=100 (10s)" PICS: CC.S.F00 && CC.S.C05.Rsp command: "StepSaturation" arguments: @@ -72,34 +141,123 @@ tests: - name: "StepMode" value: 1 - name: "StepSize" - value: StepSizeConfigValue + value: 20 + - name: "TransitionTime" + value: 100 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 254 + + - label: + "TH sends MoveToSaturation command to DUT with Saturation=50 and + TransitionTime=0 (immediately)" + PICS: CC.S.F00 && CC.S.C03.Rsp + command: "MoveToSaturation" + arguments: + values: + - name: "Saturation" + value: 50 + - 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 StepSaturation command to DUT with StepMode=0x03 (down), + StepSize=40 and TransitionTime=200 (20s)" + PICS: CC.S.F00 && CC.S.C05.Rsp + command: "StepSaturation" + arguments: + values: + - name: "StepMode" + value: 3 + - name: "StepSize" + value: 40 - name: "TransitionTime" - value: 10 + value: 200 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - #delay step is necessary to let the attribute value change over time - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "Over TransitionTime,TH read CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 25 + maxValue: 35 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 - - label: "TH sends StepSaturation command to DUT with StepMode Down" + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 10 + maxValue: 15 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 10 + + - label: + "TH sends StepSaturation command to DUT with StepMode=0x03 (down), + StepSize=20 and TransitionTime=100 (10 s)" PICS: CC.S.F00 && CC.S.C05.Rsp command: "StepSaturation" arguments: @@ -107,36 +265,51 @@ tests: - name: "StepMode" value: 3 - name: "StepSize" - value: StepSizeConfigValue + value: 20 - name: "TransitionTime" - value: 10 + value: 100 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "Over TransitionTime,TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F00 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" + response: + value: 0 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" response: constraints: - type: int8u minValue: 0 - maxValue: 254 + maxValue: 3 - 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_4_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml index c70370f33b7da6..f855351c446655 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_4.yaml @@ -13,21 +13,12 @@ # limitations under the License. name: - 27.2.8. [TC-CC-4.4] MoveToHueAndSaturation functionality with server as DUT - -PICS: - - CC.S + 25.3.8. [TC-CC-4.4] MoveToHueAndSaturation functionality with server as DUT config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - hueConfigValue: - type: int8u - defaultValue: 40 - SaturationConfigValue: - type: int8u - defaultValue: 160 tests: - label: "Wait for the commissioned device to be retrieved" @@ -38,19 +29,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.F00 && CC.S.A000f command: "writeAttribute" @@ -58,77 +36,163 @@ tests: arguments: value: 0 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + + - label: + "TH sends MoveToHueAndSaturation command to DUT with Hue=200, + Saturation=50 and TransitionTime=0 (immediately)" + PICS: CC.S.F01 && CC.S.C06.Rsp + command: "MoveToHueAndSaturation" + arguments: + values: + - name: "hue" + value: 200 + - name: "Saturation" + value: 50 + - 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 reads CurrentHue attribute from DUT." - PICS: CC.S.F01 && CC.S.A0000 + PICS: CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp command: "readAttribute" attribute: "CurrentHue" response: + value: 200 constraints: type: int8u minValue: 0 maxValue: 254 - - label: "TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F01 && CC.S.A0001 - command: "readAttribute" - attribute: "CurrentSaturation" - response: - constraints: - type: int8u - minValue: 0 - maxValue: 254 - - - label: "TH sends MoveToHueAndSaturation command to DUT." + - label: + "TH sends MoveToHueAndSaturation command to DUT with Hue=160, + Saturation=80 and TransitionTime=200 (20s)" PICS: CC.S.F01 && CC.S.C06.Rsp command: "MoveToHueAndSaturation" arguments: values: - name: "hue" - value: hueConfigValue + value: 160 - name: "Saturation" - value: SaturationConfigValue + value: 80 - name: "TransitionTime" - value: 10 + value: 200 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1500 + value: 10000 - - label: "Over TransitionTime, TH reads CurrentHue attribute from DUT" - PICS: CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 command: "readAttribute" attribute: "CurrentHue" response: - value: hueConfigValue constraints: - type: int8u - minValue: 0 - maxValue: 254 + minValue: 175 + maxValue: 185 - - label: - "Over TransitionTime, TH reads CurrentSaturation attribute from DUT" - PICS: CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 60 + maxValue: 70 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + constraints: + minValue: 160 + maxValue: 170 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 command: "readAttribute" attribute: "CurrentSaturation" response: - value: SaturationConfigValue constraints: type: int8u + minValue: 70 + maxValue: 80 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentHue attribute from DUT" + PICS: CC.S.F00 && CC.S.A0000 + command: "readAttribute" + attribute: "CurrentHue" + response: + value: 160 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 80 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 - maxValue: 254 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 3 - 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_5_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml index 5638f482cddbc2..e55fd7d4fc45c2 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.9. [TC-CC-5.1] Color MoveTo functionality with server as DUT +name: 25.3.10. [TC-CC-5.1] Color MoveTo functionality with server as DUT PICS: - CC.S @@ -31,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" - PICS: OO.S.A0000 - cluster: "On/Off" - command: "readAttribute" - attribute: "OnOff" - response: - value: 1 - - label: "TH writes 0 to the Options attribute" PICS: CC.S.F03 && CC.S.A000f command: "writeAttribute" @@ -51,27 +38,54 @@ tests: arguments: value: 0 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + + - label: + "TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 + ColorY = 19660/0x4CCC TransitionTime = 0 (immediate)" + PICS: CC.S.F03 && CC.S.C07.Rsp + command: "MoveToColor" + arguments: + values: + - name: "colorX" + value: 32768 + - name: "colorY" + value: 19660 + - 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 reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 command: "readAttribute" attribute: "CurrentX" response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + value: 32768 - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 command: "readAttribute" attribute: "CurrentY" response: - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + value: 19660 - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 + ColorY = 13107/0x3333 TransitionTime = 200 (20s)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -81,62 +95,104 @@ tests: - name: "colorY" value: 13107 - name: "TransitionTime" - value: 10 + value: 200 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1500 + value: 10000 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: - value: 13107 constraints: - type: int16u - minValue: 0 - maxValue: 65279 + minValue: 13107 + maxValue: 32768 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: - value: 13107 constraints: - type: int16u - minValue: 0 - maxValue: 65279 + minValue: 13107 + maxValue: 19660 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentX attribute from DUT" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp + command: "readAttribute" + attribute: "CurrentX" + response: + constraints: + minValue: 13107 + maxValue: 15073 + + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp + command: "readAttribute" + attribute: "CurrentY" + response: + constraints: + minValue: 13107 + maxValue: 15073 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentX attribute from DUT" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp + command: "readAttribute" + attribute: "CurrentX" + response: + value: 13107 + + - label: "TH reads CurrentY attribute from DUT" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp + command: "readAttribute" + attribute: "CurrentY" + response: + value: 13107 - label: "TH writes 0 to the Options attribute" - PICS: CC.S.F03 && CC.S.A000f + PICS: CC.S.A000f command: "writeAttribute" attribute: "Options" arguments: value: 0 - - label: "TH reads Options attribute" - PICS: CC.S.F03 && CC.S.A000f - command: "writeAttribute" + - label: "TH read Options attribute" + PICS: CC.S.A000f + command: "readAttribute" attribute: "Options" - arguments: + response: value: 0 - - label: "Turn on light for color control tests" - PICS: OO.S.C01.Rsp - cluster: "On/Off" - command: "on" - - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends a MoveToColor command to the DUT with ColorX = 32768/0x8000 + (x=0.5) (purple) ColorY = 19660/0x4CCC (y=0.3) TransitionTime = 0 + (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -160,14 +216,14 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 32768 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" @@ -177,9 +233,11 @@ tests: - label: "TH sends Off command to DUT" PICS: OO.S.C00.Rsp cluster: "On/Off" - command: "off" + command: "Off" - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 + ColorY = 13107/0x3333 TransitionTime = 0 (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -203,21 +261,23 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 32768 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: value: 19660 - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 + ColorY = 32768/0x8000 TransitionTime = 0 (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -241,21 +301,23 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 32768 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: value: 19660 - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 + ColorY = 32768/0x8000 TransitionTime = 0 (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -279,14 +341,14 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 26214 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" @@ -294,25 +356,27 @@ tests: value: 32768 - label: "TH writes 1 to the Options attribute" - PICS: CC.S.F03 && CC.S.A000f + PICS: CC.S.A000f command: "writeAttribute" attribute: "Options" arguments: value: 1 - - label: "TH reads Options attribute" - PICS: CC.S.F03 && CC.S.A000f - command: "writeAttribute" + - label: "TH read Options attribute" + PICS: CC.S.A000f + command: "readAttribute" attribute: "Options" - arguments: + response: value: 1 - - label: "Turn on light for color control tests" + - label: "TH sends On command to DUT" PICS: OO.S.C01.Rsp cluster: "On/Off" - command: "on" + command: "On" - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 + ColorY = 19660/0x4CCC TransitionTime = 0 (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -336,26 +400,28 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 32768 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: value: 19660 - - label: "Turn off light that we turned on" + - label: "TH sends Off command to DUT" PICS: OO.S.C00.Rsp cluster: "On/Off" - command: "off" + command: "Off" - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 + ColorY = 13107/0x3333 TransitionTime = 0 (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -379,21 +445,23 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 13107 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: value: 13107 - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 + ColorY = 32768/0x8000 TransitionTime = 0 (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -417,21 +485,23 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 13107 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: value: 13107 - - label: "TH sends MoveToColor command to DUT" + - label: + "TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 + ColorY = 32768/0x8000 TransitionTime = 0 (immediate)" PICS: CC.S.F03 && CC.S.C07.Rsp command: "MoveToColor" arguments: @@ -455,16 +525,34 @@ tests: - name: "ms" value: 100 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" + - label: "TH reads CurrentX attribute from DUT" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentX" response: value: 26214 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" + - label: "TH reads CurrentY attribute from DUT" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp command: "readAttribute" attribute: "CurrentY" response: value: 32768 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 3 diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml index ddc1817ab7622f..94031eaaea7983 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_2.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.10. [TC-CC-5.2] Color Move functionality with server as DUT +name: 25.3.11. [TC-CC-5.2] Color Move functionality with server as DUT PICS: - CC.S @@ -21,12 +21,6 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - RateXValue: - type: int16s - defaultValue: 50 - RateYValue: - type: int16s - defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -37,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.F03 && CC.S.A000f command: "writeAttribute" @@ -57,27 +38,36 @@ tests: arguments: value: 0 - - label: "TH reads CurrentX attribute from DUT" - command: "readAttribute" - PICS: CC.S.F03 && CC.S.A0003 - attribute: "CurrentX" - response: - saveAs: CurrentXValue - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" - - label: "TH reads CurrentY attribute from DUT" - command: "readAttribute" - PICS: CC.S.F03 && CC.S.A0004 - attribute: "CurrentY" - response: - saveAs: CurrentYValue - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = + 26000 TransitionTime = 0 (immediate)" + PICS: CC.S.F03 && CC.S.C07.Rsp + command: "MoveToColor" + arguments: + values: + - name: "colorX" + value: 33000 + - name: "colorY" + value: 26000 + - 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 MoveColor command to DUT" command: "MoveColor" @@ -85,43 +75,93 @@ tests: arguments: values: - name: "rateX" - value: RateXValue + value: -100 - name: "rateY" - value: RateYValue + value: 100 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - label: "TH reads CurrentX attribute from DUT" + command: "readAttribute" PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp + attribute: "CurrentX" + response: + constraints: + minValue: 31500 + maxValue: 32500 + + - label: "TH reads CurrentY attribute from DUT" + command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp + attribute: "CurrentY" + response: + constraints: + minValue: 26500 + maxValue: 27500 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp attribute: "CurrentX" response: - saveAs: CurrentXBeforeStopCommand constraints: - type: int16u - minValue: CurrentXValue - maxValue: 65279 + minValue: 30500 + maxValue: 31500 - label: "TH reads CurrentY attribute from DUT" + command: "readAttribute" PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp + attribute: "CurrentY" + response: + constraints: + minValue: 27500 + maxValue: 28500 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentX attribute from DUT" + command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp + attribute: "CurrentX" + response: + saveAs: CurrentXValue + constraints: + minValue: 29500 + maxValue: 30500 + + - label: "TH reads CurrentY attribute from DUT" command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp attribute: "CurrentY" response: - saveAs: CurrentYBeforeStopCommand + saveAs: CurrentYValue constraints: - type: int16u - minValue: CurrentYValue - maxValue: 65279 + minValue: 28500 + maxValue: 29500 - label: "TH sends StopMoveStep command to DUT" PICS: CC.S.F03 && CC.S.C47.Rsp @@ -133,30 +173,48 @@ tests: - name: "OptionsOverride" value: 0 + #Checking range as exactly delay might not be achieved due to attribute reads - label: "TH reads CurrentX attribute from DUT" - PICS: CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp attribute: "CurrentX" response: constraints: - type: int16u - minValue: CurrentXBeforeStopCommand - maxValue: 65279 + minValue: 29500 + maxValue: 30500 + #Checking range as exactly delay might not be achieved due to attribute reads - label: "TH reads CurrentY attribute from DUT" - PICS: CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp attribute: "CurrentY" response: constraints: - type: int16u - minValue: CurrentYBeforeStopCommand - maxValue: 65279 + minValue: 28500 + maxValue: 29500 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 3 - 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_5_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml index e80c7f0cf937a4..8ff6b447ed9256 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_3.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.11. [TC-CC-5.3] Color Step functionality with server as DUT +name: 25.3.12. [TC-CC-5.3] Color Step functionality with server as DUT PICS: - CC.S @@ -21,12 +21,6 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - StepXConfigValue: - type: int16s - defaultValue: 100 - StepYConfigValue: - type: int16s - defaultValue: 100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -37,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.F03 && CC.S.A000f command: "writeAttribute" @@ -57,76 +38,151 @@ tests: arguments: value: 0 - - label: "TH reads CurrentX attribute from DUT" - command: "readAttribute" - PICS: CC.S.F03 && CC.S.A0003 - attribute: "CurrentX" - response: - saveAs: CurrentXValue - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" - - label: "TH reads CurrentY attribute from DUT" - command: "readAttribute" - PICS: CC.S.F03 && CC.S.A0004 - attribute: "CurrentY" - response: - saveAs: CurrentYValue - constraints: - type: int16u - minValue: 0 - maxValue: 65279 + - label: + "TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = + 20000 TransitionTime = 0 (immediate)" + PICS: CC.S.F03 && CC.S.C07.Rsp + command: "MoveToColor" + arguments: + values: + - name: "colorX" + value: 33000 + - name: "colorY" + value: 20000 + - name: "TransitionTime" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "TH sends StepColor command to DUT" + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: + "TH sends StepColor command to DUT, with StepX = -2000, StepY = -6000, + TransitionTime = 200 (20s)" command: "StepColor" PICS: CC.S.F03 && CC.S.C09.Rsp arguments: values: - name: "stepX" - value: StepXConfigValue + value: -20000 - name: "stepY" - value: StepYConfigValue + value: -6000 - name: "TransitionTime" - value: 10 + value: 200 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1500 + value: 10000 - - label: "Over TransitionTime, TH reads CurrentX attribute from DUT" - PICS: CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp + - label: "TH reads CurrentX attribute from DUT" command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp attribute: "CurrentX" response: constraints: - type: int16u - minValue: CurrentXValue - maxValue: 65279 + minValue: 13000 + maxValue: 33000 - - label: "Over TransitionTime, TH reads CurrentY attribute from DUT" - PICS: CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp + - label: "TH reads CurrentY attribute from DUT" command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp attribute: "CurrentY" response: constraints: - type: int16u - minValue: CurrentYValue - maxValue: 65279 + minValue: 14000 + maxValue: 20000 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads CurrentX attribute from DUT" + command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp + attribute: "CurrentX" + response: + constraints: + minValue: 13000 + maxValue: 14000 + + - label: "TH reads CurrentY attribute from DUT" + command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp + attribute: "CurrentY" + response: + constraints: + minValue: 14000 + maxValue: 15000 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads CurrentX attribute from DUT" + command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp + attribute: "CurrentX" + response: + value: 13000 + + - label: "TH reads CurrentY attribute from DUT" + command: "readAttribute" + PICS: CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp + attribute: "CurrentY" + response: + value: 14000 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 3 - 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_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml index fe0246a8b14626..6a045f54a04452 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. name: - 27.2.12. [TC-CC-6.1] Color Temperature MoveTo functionality with server as + 25.3.14. [TC-CC-6.1] Color Temperature MoveTo functionality with server as DUT PICS: @@ -33,19 +33,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.F04 && CC.S.A000f command: "writeAttribute" @@ -53,6 +40,11 @@ tests: arguments: value: 0 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -85,43 +77,134 @@ tests: minValue: ColorTempPhysicalMinMiredsValue maxValue: ColorTempPhysicalMaxMiredsValue - - label: "Move To Color Temperature command" - PICS: CC.S.F04 && CC.S.C0A.Rsp + - label: + "TH sends MoveToColorTemperature command to DUT with + ColorTemperatureMireds=310 and TransitionTime=0 (immediately)." + PICS: CC.S.F04 && CC.S.C0a.Rsp command: "MoveToColorTemperature" arguments: values: - name: "colorTemperature" - value: ColorTempPhysicalMaxMiredsValue + value: 310 - name: "TransitionTime" - value: 10 + value: 0 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1500ms" + - label: "Wait 100ms" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1500 + value: 100 - - label: "Read current color temprature" - PICS: CC.S.F04 && CC.S.A0007 + - label: + "TH sends MoveToColorTemperatur command to DUT with + ColorTemperatureMireds=250 and TransitionTime=300 (30s)." + PICS: CC.S.F04 && CC.S.C0a.Rsp + command: "MoveToColorTemperature" + arguments: + values: + - name: "colorTemperature" + value: 250 + - name: "TransitionTime" + value: 300 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp command: "readAttribute" attribute: "ColorTemperature" response: - value: ColorTempPhysicalMaxMiredsValue constraints: - type: int16u - minValue: ColorTempPhysicalMinMiredsValue - maxValue: ColorTempPhysicalMaxMiredsValue + minValue: 280 + maxValue: 300 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp + command: "readAttribute" + attribute: "ColorTemperature" + response: + constraints: + minValue: 260 + maxValue: 280 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp + command: "readAttribute" + attribute: "ColorTemperature" + response: + constraints: + minValue: 250 + maxValue: 260 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads ColorTemperatureMireds attribute from DUT." + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp + command: "readAttribute" + attribute: "ColorTemperature" + response: + value: 250 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 3 - - 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_6_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml index 255bf0002ba998..6c9646b0cb7595 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 @@ -13,7 +13,7 @@ # limitations under the License. name: - 27.2.13. [TC-CC-6.2] Color Temperature Move functionality with server as DUT + 25.3.15. [TC-CC-6.2] Color Temperature Move functionality with server as DUT PICS: - CC.S @@ -32,19 +32,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.F04 && CC.S.A000f command: "writeAttribute" @@ -52,6 +39,11 @@ tests: arguments: value: 0 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -85,7 +77,7 @@ tests: maxValue: ColorTempPhysicalMaxMiredsValue - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Up" - PICS: CC.S.F04 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.C4b.Rsp command: "MoveColorTemperature" arguments: values: @@ -111,7 +103,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -129,7 +121,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -147,7 +139,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -157,7 +149,7 @@ tests: maxValue: ColorTempPhysicalMaxMiredsValue - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Down" - PICS: CC.S.F04 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.C4b.Rsp command: "MoveColorTemperature" arguments: values: @@ -183,7 +175,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -201,7 +193,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -219,7 +211,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -229,7 +221,7 @@ tests: maxValue: ColorTempPhysicalMaxMiredsValue - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Up" - PICS: CC.S.F04 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.C4b.Rsp command: "MoveColorTemperature" arguments: values: @@ -247,7 +239,7 @@ tests: value: 0 - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Stop" - PICS: CC.S.F04 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.C4b.Rsp command: "MoveColorTemperature" arguments: values: @@ -273,7 +265,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -292,7 +284,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -311,7 +303,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -322,7 +314,7 @@ tests: maxValue: ColorTempPhysicalMaxMiredsValue - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Down" - PICS: CC.S.F04 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.C4b.Rsp command: "MoveColorTemperature" arguments: values: @@ -340,7 +332,7 @@ tests: value: 0 - label: "TH sends MoveColorTemperature command to DUT with MoveMode = Stop" - PICS: CC.S.F04 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.C4b.Rsp command: "MoveColorTemperature" arguments: values: @@ -366,7 +358,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -385,7 +377,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -404,7 +396,7 @@ tests: value: 1000 - label: "Read current color temprature attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp command: "readAttribute" attribute: "ColorTemperature" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml index 172daf51049dc3..a5990c1067cdaf 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 @@ -13,7 +13,7 @@ # limitations under the License. name: - 27.2.14. [TC-CC-6.3] Color Temperature Step functionality with server as DUT + 25.3.16. [TC-CC-6.3] Color Temperature Step functionality with server as DUT PICS: - CC.S @@ -32,19 +32,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.F04 && CC.S.A000f command: "writeAttribute" @@ -52,6 +39,11 @@ tests: arguments: value: 0 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + - label: "TH reads ColorTempPhysicalMinMireds attribute from DUT" PICS: CC.S.F04 && CC.S.A400b command: "readAttribute" @@ -85,7 +77,7 @@ tests: maxValue: ColorTempPhysicalMaxMiredsValue - label: "TH sends StepColorTemperature command to DUT with MoveMode = Up" - PICS: CC.S.F04 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.C4c.Rsp command: "StepColorTemperature" arguments: values: @@ -113,7 +105,7 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -131,7 +123,7 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -149,7 +141,7 @@ tests: value: 700 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -159,7 +151,7 @@ tests: maxValue: 65279 - label: "TH sends StepColorTemperature command to DUT with MoveMode = Down" - PICS: CC.S.F04 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.C4c.Rsp command: "StepColorTemperature" arguments: values: @@ -187,7 +179,7 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -205,7 +197,7 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp command: "readAttribute" attribute: "ColorTemperature" response: @@ -223,7 +215,7 @@ tests: value: 500 - label: "TH reads ColorTemperatureMireds attribute from DUT several times" - PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp + PICS: CC.S.F04 && CC.S.A0007 && CC.S.C4c.Rsp command: "readAttribute" attribute: "ColorTemperature" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml index 6a508996999413..5245c74c1b6ab4 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.15. [TC-CC-7.1] Enhanced MoveToHue functionality with server as DUT +name: 25.3.18. [TC-CC-7.1] Enhanced MoveToHue functionality with server as DUT PICS: - CC.S @@ -22,21 +22,6 @@ config: cluster: "Color Control" endpoint: 1 timeout: 150 - EnhancedHueConfigValue: - type: int16u - defaultValue: 1025 - EnhancedHueShortestDistanceConfigValue: - type: int16u - defaultValue: 1050 - EnhancedHueLongestDistanceConfigValue: - type: int16u - defaultValue: 1200 - EnhancedHueDirectionUpConfigValue: - type: int16u - defaultValue: 1300 - EnhancedHueDirectionDownConfigValue: - type: int16u - defaultValue: 1100 tests: - label: "Wait for the commissioned device to be retrieved" @@ -47,19 +32,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.F01 && CC.S.A000f command: "writeAttribute" @@ -67,13 +39,20 @@ tests: arguments: value: 0 - - label: "TH sends EnhancedMoveToHue command to DUT" + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)" PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: EnhancedHueConfigValue + value: 6000 - name: "Direction" value: 0 - name: "TransitionTime" @@ -83,24 +62,23 @@ tests: - name: "OptionsOverride" value: 0 - - label: "TH reads EnhancedCurrentHue attribute from DUT" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp - command: "readAttribute" - attribute: "EnhancedCurrentHue" - response: - value: EnhancedHueConfigValue - constraints: - type: int16u - minValue: 0 - maxValue: 65535 + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 - - label: "TH sends EnhancedMoveToHue command to DUT" + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, + Direction=0x00 (shortest distance) and TransitionTime=300 (30s)." PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: EnhancedHueShortestDistanceConfigValue + value: 12000 - name: "Direction" value: 0 - name: "TransitionTime" @@ -110,68 +88,107 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 7000 + maxValue: 9000 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 9000 + maxValue: 11000 - - label: "Wait 20s" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 20000 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: EnhancedHueShortestDistanceConfigValue constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 11000 + maxValue: 12000 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: 12000 + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)" + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" + arguments: + values: + - name: "EnhancedHue" + value: 6000 + - 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 EnhancedMoveToHue command to DUT" + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=54000, + Direction=0x01 (longest distance) and TransitionTime=300 (30s)" PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: EnhancedHueLongestDistanceConfigValue + value: 54000 - name: "Direction" value: 1 - name: "TransitionTime" @@ -181,68 +198,107 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 18700 + maxValue: 25300 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 34700 + maxValue: 41300 - - label: "Wait 20s" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 20000 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: EnhancedHueLongestDistanceConfigValue constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 50700 + maxValue: 54000 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: 54000 + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)" + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" + arguments: + values: + - name: "EnhancedHue" + value: 6000 + - 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 EnhancedMoveToHue command to DUT" + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, + Direction=0x02 (up) and TransitionTime=300 (30s)" PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: EnhancedHueDirectionUpConfigValue + value: 12000 - name: "Direction" value: 2 - name: "TransitionTime" @@ -252,68 +308,107 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 7000 + maxValue: 9000 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 9000 + maxValue: 11000 - - label: "Wait 20s" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 20000 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: EnhancedHueDirectionUpConfigValue constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 11000 + maxValue: 12000 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: 12000 + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)" + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" + arguments: + values: + - name: "EnhancedHue" + value: 12000 + - name: "Direction" + value: 0 + - name: "TransitionTime" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "TH sends EnhancedMoveToHue command to DUT " + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, + Direction=0x03 (down) and TransitionTime=300 (30s)." PICS: CC.S.F01 && CC.S.C40.Rsp command: "EnhancedMoveToHue" arguments: values: - name: "EnhancedHue" - value: EnhancedHueDirectionDownConfigValue + value: 6000 - name: "Direction" value: 3 - name: "TransitionTime" @@ -323,65 +418,94 @@ tests: - name: "OptionsOverride" value: 0 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 9000 + maxValue: 11000 - - label: "Wait 5500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 5500 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 7000 + maxValue: 9000 - - label: "Wait 20s" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 20000 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT periodically" + - label: "TH reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: EnhancedHueDirectionDownConfigValue constraints: - type: int16u + minValue: 6000 + maxValue: 7000 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: 6000 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 - maxValue: 65535 + maxValue: 3 - - label: "Turn off light that we turned on" + - label: "Turn Off light that we turned on" PICS: OO.S.C00.Rsp cluster: "On/Off" - command: "off" + command: "Off" - label: "Check on/off attribute value is false after off command" cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml index d9983803999b83..1b07405309e765 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 @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.16. [TC-CC-7.2] Enhanced MoveHue functionality with server as DUT +name: 25.3.19. [TC-CC-7.2] Enhanced MoveHue functionality with server as DUT PICS: - CC.S @@ -21,9 +21,6 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - RateConfigValue: - type: int16u - defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -34,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.F01 && CC.S.A000f command: "writeAttribute" @@ -54,17 +38,40 @@ tests: arguments: value: 0 - - label: "TH reads EnhancedCurrentHue attribute from DUT" - command: "readAttribute" - PICS: CC.S.F01 && CC.S.A4000 - attribute: "EnhancedCurrentHue" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65535 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + + - 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: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 - - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Up" + - label: + "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: @@ -72,67 +79,57 @@ tests: - name: "MoveMode" value: 1 - name: "Rate" - value: RateConfigValue + value: 500 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 22500 + maxValue: 27500 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 27500 + maxValue: 32500 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp - command: "readAttribute" - attribute: "EnhancedCurrentHue" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65535 - - - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Stop" + - label: + "TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and + Rate=5 (units/s)" PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: @@ -140,43 +137,68 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 0 + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "TH reads EnhancedCurrentHue attribute from DUT several times" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: - saveAs: EnhancedCurrentHueStep3b constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 34000 + maxValue: 36000 - - label: "Wait 1000ms" + - label: "Wait 2s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 2000 - - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + #Checking range as exactly delay might not be achieved due to attribute reads + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: - value: EnhancedCurrentHueStep3b constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 34500 + maxValue: 36000 + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" + arguments: + values: + - name: "EnhancedHue" + value: 25000 + - name: "Direction" + value: 0 + - name: "TransitionTime" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 - - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Down" + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 + + - label: + "TH sends EnhancedMoveHue command to DUT with MoveMode=0x03 (down) and + Rate=500 (units/s)" PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: @@ -184,67 +206,57 @@ tests: - name: "MoveMode" value: 3 - name: "Rate" - value: RateConfigValue + value: 500 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - 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 several times" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 17500 + maxValue: 22500 - - 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 several times" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 12500 + maxValue: 17500 - - 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 several times" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp - command: "readAttribute" - attribute: "EnhancedCurrentHue" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65535 - - - label: "TH sends EnhancedMoveHue command to DUT with MoveMode Stop" + - label: + "TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and + Rate=5 (units/s)" PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: @@ -252,46 +264,61 @@ tests: - name: "MoveMode" value: 0 - name: "Rate" - value: 0 + value: 5 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: - saveAs: EnhancedCurrentHueStep5b constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 9500 + maxValue: 12500 - - label: "Wait 1000ms" + - label: "Wait 2s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 2000 - - label: "TH reads EnhancedCurrentHue attribute from DUT several times." - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + #Checking range as exactly delay might not be achieved due to attribute reads + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: - value: EnhancedCurrentHueStep5b constraints: - type: int16u + minValue: 9500 + maxValue: 12500 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 - maxValue: 65535 + maxValue: 3 - - 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_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml index 8d6fd8136e32cb..f336d397ec1076 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_3.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.17. [TC-CC-7.3] Enhanced Step functionality with server as DUT +name: 25.3.20. [TC-CC-7.3] Enhanced Step functionality with server as DUT PICS: - CC.S @@ -21,9 +21,6 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - StepSizeConfigValue: - type: int16u - defaultValue: 50 tests: - label: "Wait for the commissioned device to be retrieved" @@ -34,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.F01 && CC.S.A000f command: "writeAttribute" @@ -54,88 +38,253 @@ tests: arguments: value: 0 - - label: "TH reads EnhancedCurrentHue attribute from DUT" - command: "readAttribute" - PICS: CC.S.F01 && CC.S.A4000 - attribute: "EnhancedCurrentHue" - response: - constraints: - type: int16u - minValue: 0 - maxValue: 65535 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" - - label: "TH sends EnhancedStepHue command to DUT with StepMode Up" + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" + arguments: + values: + - name: "EnhancedHue" + value: 6000 + - 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 EnhancedStepHue command to DUT with StepMode=0x01 (up), + StepSize=6000 and TransitionTime=300 (30s)." PICS: CC.S.F01 && CC.S.C42.Rsp command: "EnhancedStepHue" arguments: values: - name: "StepMode" - value: 0 + value: 1 - name: "StepSize" - value: StepSizeConfigValue + value: 6000 - name: "TransitionTime" - value: 10 + value: 300 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT" + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: int16u - minValue: 0 - maxValue: 65535 + minValue: 7000 + maxValue: 9000 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + attribute: "EnhancedCurrentHue" + response: + constraints: + minValue: 9000 + maxValue: 11000 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + attribute: "EnhancedCurrentHue" + response: + constraints: + minValue: 11000 + maxValue: 12000 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 - - label: "TH sends EnhancedStepHue command to DUT with StepMode Down" + - label: "TH reads EnhancedCurrentHue attribute from DUT" + command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + attribute: "EnhancedCurrentHue" + response: + value: 12000 + + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." + PICS: CC.S.F01 && CC.S.C40.Rsp + command: "EnhancedMoveToHue" + arguments: + values: + - name: "EnhancedHue" + value: 12000 + - 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 EnhancedStepHue command to DUT with StepMode=0x03 (down), + StepSize=6000 and TransitionTime=300 (30s)" PICS: CC.S.F01 && CC.S.C42.Rsp command: "EnhancedStepHue" arguments: values: - name: "StepMode" - value: 1 + value: 3 - name: "StepSize" - value: StepSizeConfigValue + value: 6000 - name: "TransitionTime" - value: 10 + value: 300 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1000ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1000 + value: 10000 - - label: "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT" + - label: "TH reads EnhancedCurrentHue attribute from DUT" command: "readAttribute" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp attribute: "EnhancedCurrentHue" response: constraints: - type: int16u + minValue: 9000 + maxValue: 11000 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + attribute: "EnhancedCurrentHue" + response: + constraints: + minValue: 7000 + maxValue: 9000 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + attribute: "EnhancedCurrentHue" + response: + constraints: + minValue: 6000 + maxValue: 7000 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + command: "readAttribute" + PICS: CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp + attribute: "EnhancedCurrentHue" + response: + value: 6000 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 - maxValue: 65535 + maxValue: 3 - - 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_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml index 153c731cedd0ad..e7809e76bf4024 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_4.yaml @@ -13,7 +13,7 @@ # limitations under the License. name: - 27.2.18. [TC-CC-7.4] MoveToEnhancedHueAndSaturation functionality with + 25.3.21. [TC-CC-7.4] MoveToEnhancedHueAndSaturation functionality with server as DUT PICS: @@ -23,12 +23,6 @@ config: nodeId: 0x12344321 cluster: "Color Control" endpoint: 1 - EnhancedHueConfigValue: - type: int16u - defaultValue: 1200 - SaturationConfigValue: - type: int8u - defaultValue: 90 tests: - label: "Wait for the commissioned device to be retrieved" @@ -39,19 +33,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.F01 && CC.S.A000f command: "writeAttribute" @@ -59,57 +40,167 @@ tests: arguments: value: 0 + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp + cluster: "On/Off" + command: "On" + + - label: + "TH sends EnhancedMoveToHueAndSaturation command to DUT with + EnhancedHue=20000, Saturation=50 and TransitionTime=0 (immediately)" + PICS: CC.S.F01 && CC.S.C43.Rsp + command: "EnhancedMoveToHueAndSaturation" + arguments: + values: + - name: "EnhancedHue" + value: 20000 + - name: "Saturation" + value: 50 + - 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 reads EnhancedCurrentHue attribute from DUT" PICS: CC.S.F01 && CC.S.A4000 command: "readAttribute" attribute: "EnhancedCurrentHue" response: - constraints: - type: int16u - minValue: 0 - maxValue: 65535 + value: 20000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 50 - - label: "TH sends EnhancedMoveToHueAndSaturation command to DUT" + - label: + "TH sends EnhancedMoveToHueAndSaturation command to DUT with + EnhancedHue=16000, Saturation=80 and TransitionTime=200 (20s)" PICS: CC.S.F01 && CC.S.C43.Rsp command: "EnhancedMoveToHueAndSaturation" arguments: values: - name: "EnhancedHue" - value: EnhancedHueConfigValue + value: 16000 - name: "Saturation" - value: SaturationConfigValue + value: 80 - name: "TransitionTime" - value: 10 + value: 200 - name: "OptionsMask" value: 0 - name: "OptionsOverride" value: 0 - - label: "Wait 1500ms" + - label: "Wait 10s" cluster: "DelayCommands" command: "WaitForMs" arguments: values: - name: "ms" - value: 1500 + value: 10000 - - label: - "Check EnhancedCurrentHue attribute value matched the value sent by - the last command" - PICS: CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + constraints: + type: int16u + minValue: 17000 + maxValue: 19000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 56 + maxValue: 74 + + - label: "Wait 10s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 10000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 command: "readAttribute" attribute: "EnhancedCurrentHue" response: - value: EnhancedHueConfigValue constraints: type: int16u + minValue: 16000 + maxValue: 17000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + constraints: + minValue: 68 + maxValue: 80 + + - label: "Wait 5s" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 5000 + + - label: "TH reads EnhancedCurrentHue attribute from DUT" + PICS: CC.S.F01 && CC.S.A4000 + command: "readAttribute" + attribute: "EnhancedCurrentHue" + response: + value: 16000 + + - label: "TH reads CurrentSaturation attribute from DUT" + PICS: CC.S.F01 && CC.S.A0001 + command: "readAttribute" + attribute: "CurrentSaturation" + response: + value: 80 + + - label: "TH reads ColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A0008 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: + minValue: 0 + maxValue: 2 + + - label: "TH reads EnhancedColorMode attribute from DUT" + PICS: CC.S.F00 && CC.S.A4001 + command: "readAttribute" + attribute: "ColorMode" + response: + constraints: minValue: 0 - maxValue: 65535 + maxValue: 3 - - 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_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index 680dec2a3097d5..a13e0c10c5d5a5 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 @@ -299,7 +299,7 @@ tests: maxValue: 65279 - label: "TH sends MoveColorTemperature command to DUT" - PICS: CC.S.C4B.Rsp && CC.S.F04 + PICS: CC.S.C4b.Rsp && CC.S.F04 command: "MoveColorTemperature" arguments: values: @@ -325,7 +325,7 @@ tests: value: 1000 - label: "TH reads ColorTemperatureMireds attribute from DUT" - PICS: CC.S.A0007 && CC.S.C4B.Rsp && CC.S.F04 + PICS: CC.S.A0007 && CC.S.C4b.Rsp && CC.S.F04 command: "readAttribute" attribute: "ColorTemperature" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml index 85452a7e160a71..6213ccbe3131ce 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_1.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 27.2.20. [TC-CC-9.1] ColorLoopSet Validation +name: 25.3.24. [TC-CC-9.1] ColorLoopSet Validation PICS: - CC.S @@ -32,23 +32,21 @@ tests: - name: "nodeId" value: nodeId - - label: "Precondition : Turn on light for color control tests" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 + + - label: "TH sends On command to DUT" PICS: OO.S.C01.Rsp cluster: "On/Off" - command: "on" + command: "On" - label: - "Precondition : 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: - "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using - EnhancedMoveToHue command" + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." command: "EnhancedMoveToHue" PICS: CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp arguments: @@ -72,14 +70,9 @@ tests: - name: "ms" value: 1000 - - label: "TH writes 0 to the Options attribute" - PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 - command: "writeAttribute" - attribute: "Options" - arguments: - value: 0 - - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x0 (De-activate) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -106,7 +99,10 @@ tests: response: value: 0 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 + (UpdateDirection) and Direction attribute to 0x0 (decrement hue) to + DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -133,7 +129,9 @@ tests: response: value: 0 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x4 + (UpdateTime) and Time attribute to 30 (30s for one loop) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -160,7 +158,9 @@ tests: response: value: 30 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x8 + (UpdateStartHue) and StartHue attribute to 0x00A0 to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -187,7 +187,10 @@ tests: response: value: 160 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x1 (start from + ColorLoopStartEnhancedHue) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -264,7 +267,9 @@ tests: minValue: ColorLoopStartEnhancedHueStep5d maxValue: 65535 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x0 (De-activate) to DUT" command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -305,7 +310,10 @@ tests: response: value: ColorLoopStoredEnhancedHueStep6c - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 + (UpdateDirection) and Direction attribute to 0x1 (increment hue) to + DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -332,7 +340,10 @@ tests: response: value: 1 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x1 (start from + ColorLoopStartEnhancedHue) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -409,7 +420,9 @@ tests: minValue: ColorLoopStartEnhancedHueStep8d maxValue: 65535 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x0 (De-activate) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -450,7 +463,9 @@ tests: response: value: ColorLoopStoredEnhancedHueStep9c - - label: "Enhanced Move To Hue command" + - label: + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." command: "EnhancedMoveToHue" PICS: CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp arguments: @@ -481,7 +496,10 @@ tests: response: value: 16384 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 + (UpdateDirection) and Direction attribute to 0x0 (decrement hue) to + DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -508,7 +526,10 @@ tests: response: value: 0 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x2 (start from + EnhancedCurrentHue) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -585,7 +606,9 @@ tests: minValue: ColorLoopStartEnhancedHueStep12d maxValue: 65535 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x0 (De-activate) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -626,7 +649,10 @@ tests: response: value: ColorLoopStoredEnhancedHueStep13c - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 + (UpdateDirection) and Direction attribute to 0x1 (increment hue) to + DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -653,7 +679,10 @@ tests: response: value: 1 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x2 (start from + EnhancedCurrentHue) to DUT" command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: @@ -730,7 +759,9 @@ tests: minValue: ColorLoopStartEnhancedHueStep15d maxValue: 65535 - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x0 (De-activate) to DUT." command: "ColorLoopSet" PICS: CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp arguments: diff --git a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml index 5c486f907cf433..040c71deb68111 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_2.yaml @@ -33,23 +33,21 @@ tests: - name: "nodeId" value: nodeId - - label: "Precondition: Turn on light for color control tests" - PICS: OO.S.C01.Rsp - cluster: "On/Off" - command: "on" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 - - label: - "Precondition: Check on/off attribute value is true after on command" + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp cluster: "On/Off" - command: "readAttribute" - attribute: "OnOff" - PICS: OO.S.A0000 - response: - value: 1 + command: "On" - label: - "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using - EnhancedMoveToHue command" + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." command: "EnhancedMoveToHue" PICS: CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp arguments: @@ -73,14 +71,11 @@ tests: - name: "ms" value: 1000 - - label: "TH writes 0 to the Options attribute" - PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 - command: "writeAttribute" - attribute: "Options" - arguments: - value: 0 - - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0xF, + Action attribute to 0x0 (De-activate), Direction attribute to 0x0 + (decrement hue), Time attribute to 30, and StartHue attribute to + 0x00A0 to DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -128,7 +123,10 @@ tests: response: value: 160 - - label: "Color Loop Set Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x1 (start from + ColorLoopStartEnhancedHue) to DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -205,7 +203,10 @@ tests: minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 - - label: "Color Loop Set Command - Start Color Loop" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 + (UpdateDirection) and Direction attribute to 0x1 (increment hue) to + DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -275,7 +276,9 @@ tests: minValue: ColorLoopStartEnhancedHue maxValue: 65535 - - label: "Color Loop Set Command - Start Color Loop" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x0 (De-activate) to DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -319,7 +322,7 @@ tests: - label: "Turn off light for color control tests" 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_9_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml index 8dc1fd3aa1e026..d777b6ec241235 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_9_3.yaml @@ -32,23 +32,21 @@ tests: - name: "nodeId" value: nodeId - - label: "Precondition: Turn on light for color control tests" - PICS: OO.S.C01.Rsp - cluster: "On/Off" - command: "on" + - label: "TH writes 0 to the Options attribute" + PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 + command: "writeAttribute" + attribute: "Options" + arguments: + value: 0 - - label: - "Precondition: Check on/off attribute value is true after on command" + - label: "TH sends On command to DUT" + PICS: OO.S.C01.Rsp cluster: "On/Off" - command: "readAttribute" - attribute: "OnOff" - PICS: OO.S.A0000 - response: - value: 1 + command: "On" - label: - "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using - EnhancedMoveToHue command" + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, + Direction=0x00 (shortest distance) and TransitionTime=0 (immediately)." command: "EnhancedMoveToHue" PICS: CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp arguments: @@ -72,14 +70,11 @@ tests: - name: "ms" value: 1000 - - label: "TH writes 0 to the Options attribute" - PICS: CC.S.A000f && CC.S.F02 && CC.S.F01 - command: "writeAttribute" - attribute: "Options" - arguments: - value: 0 - - - label: "Sends ColorLoopSet Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0xF, + Action attribute to 0x0 (De-activate), Direction attribute to 0x0 + (decrement hue), Time attribute to 30, and StartHue attribute to + 0x00A0 to DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -127,7 +122,10 @@ tests: response: value: 160 - - label: "Color Loop Set Command - Set all Attributes" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x1 (start from + ColorLoopStartEnhancedHue) to DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -204,7 +202,9 @@ tests: minValue: ColorLoopStartEnhancedHueValue maxValue: 65535 - - label: "Color Loop Set Command - Start Color Loop" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x4 and + Time attribute to 60 to DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -267,7 +267,9 @@ tests: minValue: 0 maxValue: 65535 - - label: "Color Loop Set Command - Start Color Loop" + - label: + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 + (UpdateAction) and Action attribute to 0x0 (De-activate) to DUT." command: "ColorLoopSet" PICS: CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp arguments: @@ -311,7 +313,7 @@ tests: - label: "Turn off light for color control tests" 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_CGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml index 505d8e1b4bd15f..e73e45a1efcaad 100644 --- a/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CGEN_1_1.yaml @@ -70,19 +70,18 @@ tests: constraints: type: list contains: [1, 3, 5] - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml index 2ac33688447223..fa5005b3600bba 100644 --- a/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CHANNEL_1_6.yaml @@ -122,19 +122,18 @@ tests: constraints: type: list contains: [1] - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml index b1d5629027b4d6..09e8cf190ec511 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_1_11.yaml @@ -107,19 +107,18 @@ tests: constraints: type: list contains: [2] - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index 19e8a17276a515..17462b1eea9258 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -71,19 +71,18 @@ tests: value: [] constraints: type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml index 07935286e44e26..95de56495d2c2a 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_1_1.yaml @@ -71,20 +71,18 @@ tests: value: [] constraints: type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - disabled: true - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml index 95511ca338d906..5b89e14c602d67 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_1_1.yaml @@ -79,19 +79,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml index a50b3babacbea2..1a3061d7480f1d 100644 --- a/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ILL_1_1.yaml @@ -88,19 +88,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml index 386928bff11d4c..8531e6d8a1cc9e 100644 --- a/src/app/tests/suites/certification/Test_TC_I_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_1_1.yaml @@ -109,19 +109,18 @@ tests: value: [0] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml index bc5228b8da4add..35e800441f7824 100644 --- a/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_KEYPADINPUT_1_2.yaml @@ -74,19 +74,18 @@ tests: constraints: type: list contains: [1] - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml index b737768f1a8964..512da9be8ed091 100644 --- a/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LOWPOWER_1_1.yaml @@ -72,19 +72,18 @@ tests: value: [] constraints: type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index cfd000ee96ba15..6c2347b8c04b6d 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -159,19 +159,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml index 8a28ac1bcb8bdf..ab201ba3625811 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAINPUT_1_4.yaml @@ -91,19 +91,18 @@ tests: value: [] constraints: type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml index 2e7a6b880a1355..79f2db2d730064 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_1_7.yaml @@ -200,19 +200,18 @@ tests: constraints: type: list contains: [10] - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml index f91cf5834a55df..7d3ee7e38b1055 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_1.yaml @@ -101,19 +101,18 @@ tests: value: [] constraints: type: list - - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml index 8334a6494908ae..04faf9b7de593f 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_1_1.yaml @@ -70,19 +70,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml index c20a840585dd41..b94c8d6d67bded 100644 --- a/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OO_1_1.yaml @@ -99,18 +99,18 @@ tests: value: [] constraints: type: list - - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml index f6335beaef0431..dd3d65fd00c92f 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_1_1.yaml @@ -247,17 +247,18 @@ tests: value: [] constraints: type: list - - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: "TH reads the EventList attribute from the DUT" - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml index 3ab9966bb312b0..891f809dcb87ec 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_1_1.yaml @@ -134,19 +134,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml index 7a6dab90dc8e03..0de2b658fba249 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml @@ -70,19 +70,18 @@ tests: value: [] constraints: type: list - - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml index 58ba8777c67f43..a034e954f914ec 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_1_1.yaml @@ -112,19 +112,18 @@ tests: value: [] constraints: type: list - - #issue #11053 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml index 212300f3d43073..3d7c44a987f486 100644 --- a/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_RH_1_1.yaml @@ -79,18 +79,18 @@ tests: value: [] constraints: type: list - - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml index 664c8df9dd05d3..72cb31414f25d8 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_1_1.yaml @@ -137,19 +137,18 @@ tests: value: [] constraints: type: list - - #issue #15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - OUT OF SCOPE FOR V1.0 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml index 53d72aadbbfb5c..ce8925c828e004 100644 --- a/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_TGTNAV_1_9.yaml @@ -81,19 +81,18 @@ tests: constraints: type: list contains: [1] - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml index 7d70ac0e2d533e..cfbc4c77511948 100644 --- a/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TMP_1_1.yaml @@ -79,19 +79,18 @@ tests: value: [] constraints: type: list - - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not supported in SDK yet - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index 73c2d4792c5380..82c8acae87f9e8 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -182,7 +182,7 @@ tests: response: constraints: type: list - # #issue #15011 disabled steps below Global attributes missing from YAML framework + #Commenting out the step EventList attribute which is out of scope for matter V1.0 # - label: "Read the global attribute: EventList" # disabled: true # verification: | diff --git a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml index 6d570242a522b7..179d9c7257ff6f 100644 --- a/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSUIC_1_1.yaml @@ -70,19 +70,18 @@ tests: value: [] constraints: type: list - - #Issue 15011 - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml index c77e517ae9f0f1..71b8f58ae16a24 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_1_1.yaml @@ -70,19 +70,18 @@ tests: value: [] constraints: type: list - - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml index e684c667b88c1b..827e6309c19ac5 100644 --- a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_1_5.yaml @@ -81,19 +81,18 @@ tests: value: [] constraints: type: list - - #issue #11053 disabled steps below Global attributes missing from YAML framework - - label: - "Read EventList attribute from the DUT and Verify that the DUT - response provides a list of supported events." - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml index 9ac27291618063..436c4ddeb1baf9 100644 --- a/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WNCV_1_1.yaml @@ -81,76 +81,82 @@ tests: response: constraints: type: list - contains: [1, 3, 16, 17] + contains: [16, 17] - label: - "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) - attribute in AttributeList" - PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb + "Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in + AttributeList" + PICS: WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [2, 4, 18, 19] + contains: [11, 14] - - label: "Read the Feature dependent(WNCV.S.F00) attribute in AttributeList" - PICS: WNCV.S.F00 && WNCV.S.Afffb + - label: + "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) + attribute in AttributeList" + PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [5] + contains: [18, 19] - - label: "Read the Feature dependent(WNCV.S.F00) attribute in AttributeList" - PICS: WNCV.S.F00 && WNCV.S.Afffb + - label: + "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in + AttributeList" + PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb command: "readAttribute" attribute: "AttributeList" response: constraints: type: list - contains: [6] + contains: [12, 15] - - label: "Read the Feature dependent(WNCV.S.F01) attribute in AttributeList" - PICS: WNCV.S.F01 && WNCV.S.Afffb + - label: "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute" + PICS: WNCV.S.Afff9 command: "readAttribute" - attribute: "AttributeList" + attribute: "AcceptedCommandList" response: constraints: type: list - contains: [6] + contains: [0, 1, 2] - label: - "Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in - AttributeList" - PICS: WNCV.S.F00 && WNCV.S.F00 && WNCV.S.Afffb + "TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in + AcceptedCommandList" + PICS: WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02 command: "readAttribute" - attribute: "AttributeList" + attribute: "AcceptedCommandList" response: constraints: type: list - contains: [8, 11, 14] + contains: [5] - label: - "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in - AttributeList" - PICS: WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb + "TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in + AcceptedCommandList" + PICS: WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03 command: "readAttribute" - attribute: "AttributeList" + attribute: "AcceptedCommandList" response: constraints: type: list - contains: [9, 12, 15] + contains: [7] - - label: "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute" - PICS: WNCV.S.Afff9 + - label: + "TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in + AcceptedCommandList" + PICS: WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04 command: "readAttribute" attribute: "AcceptedCommandList" response: constraints: type: list - contains: [0, 1, 2] + contains: [8] - label: "TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute" PICS: WNCV.S.Afff8 @@ -160,17 +166,18 @@ tests: value: [] constraints: type: list - - #issue #15011 disabled steps below Global attributes missing from YAML framework - - label: "TH reads from the DUT the (0xFFFA) EventList attribute" - verification: | - Not implemented in chip-tool - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && WNCV.S.Afffa - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 527de2f32331af..c2575d119e763a 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -173,9 +173,9 @@ CC.S.C07.Rsp=1 CC.S.C08.Rsp=1 CC.S.C47.Rsp=1 CC.S.C09.Rsp=1 -CC.S.C0A.Rsp=1 -CC.S.C4B.Rsp=1 -CC.S.C4C.Rsp=1 +CC.S.C0a.Rsp=1 +CC.S.C4b.Rsp=1 +CC.S.C4c.Rsp=1 CC.S.C40.Rsp=1 CC.S.C41.Rsp=1 CC.S.C42.Rsp=1 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index b050a00e4fbc12..644b5e53c854f4 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -1881,7 +1881,7 @@ class TestAccessControlClusterSuite : public TestCommand class Test_TC_BOOL_1_1Suite : public TestCommand { public: - Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 7, credsIssuerConfig) + Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1974,10 +1974,6 @@ class Test_TC_BOOL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -2025,17 +2021,6 @@ class Test_TC_BOOL_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -2125,7 +2110,7 @@ class Test_TC_BOOL_2_1Suite : public TestCommand class Test_TC_ACT_1_1Suite : public TestCommand { public: - Test_TC_ACT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_1_1", 8, credsIssuerConfig) + Test_TC_ACT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -2222,10 +2207,6 @@ class Test_TC_ACT_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -2279,17 +2260,6 @@ class Test_TC_ACT_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -2298,7 +2268,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand class Test_TC_CC_1_1Suite : public TestCommand { public: - Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 7, credsIssuerConfig) + Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 42, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -2374,552 +2344,346 @@ class Test_TC_CC_1_1Suite : public TestCommand case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("(CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_2_1Suite : public TestCommand -{ -public: - Test_TC_CC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_1", 54, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - uint32_t FeatureMapValue; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 254)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint8_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16389UL)); } break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); } break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - FeatureMapValue = value; + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); } break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); - VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16396UL)); } break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16397UL)); } break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16400UL)); } break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); } break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } break; case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + } break; case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } break; case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } break; case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; - case 44: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 45: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); } break; - case 46: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); } break; - case 47: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; - case 48: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); } break; - case 49: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); } break; - case 50: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); } break; - case 51: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 75UL)); } break; - case 52: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList 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(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 76UL)); } break; - case 53: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -2945,11 +2709,744 @@ class Test_TC_CC_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } + LogStep(1, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("(CC.S.F00 || CC.S.F01 || CC.S.F02 || CC.S.F03)"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the optional attribute(CurrentHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the optional attribute(CurrentSaturation) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "Read the optional attribute(RemainingTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, "Read the optional attribute(CurrentX) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 8: { + LogStep(8, "Read the optional attribute(CurrentY) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 9: { + LogStep(9, "Read the optional attribute(DriftCompensation) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 10: { + LogStep(10, "Read the optional attribute(CompensationText) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 11: { + LogStep(11, "Read the optional attribute(ColorTemperatureMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 12: { + LogStep(12, "Read the optional attribute(EnhancedCurrentHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 13: { + LogStep(13, "Read the optional attribute(ColorLoopActive) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 14: { + LogStep(14, "Read the optional attribute(ColorLoopDirection) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 15: { + LogStep(15, "Read the optional attribute(ColorLoopTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 16: { + LogStep(16, "Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 17: { + LogStep(17, "Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 18: { + LogStep(18, "Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 19: { + LogStep(19, "Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 20: { + LogStep(20, "Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 21: { + LogStep(21, "Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 22: { + LogStep(22, "Read the optional command(MoveToHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 23: { + LogStep(23, "Read the optional command(MoveHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 24: { + LogStep(24, "Read the optional command(StepHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 25: { + LogStep(25, "Read the optional command(MoveToSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 26: { + LogStep(26, "Read the optional command(MoveSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 27: { + LogStep(27, "Read the optional command(StepSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 28: { + LogStep(28, "Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 29: { + LogStep(29, "Read the optional command(MoveToColor) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 30: { + LogStep(30, "Read the optional command(MoveColor) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 31: { + LogStep(31, "Read the optional command(StepColor) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 32: { + LogStep(32, "Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 33: { + LogStep(33, "Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 34: { + LogStep(34, "Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 35: { + LogStep(35, "Read the optional command(EnhancedStepHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 36: { + LogStep(36, "Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 37: { + LogStep(37, "Read the optional command(ColorLoopSet) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 38: { + LogStep(38, "Read the optional command(StopMoveStep) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 39: { + LogStep(39, "Read the optional command(MoveColorTemperature) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 40: { + LogStep(40, "Read the optional command(StepColorTemperature) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 41: { + LogStep(41, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CC_2_1Suite : public TestCommand +{ +public: + Test_TC_CC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_1", 54, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_CC_2_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + uint32_t FeatureMapValue; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 254)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + FeatureMapValue = value; + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + 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 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + } + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } case 2: { LogStep(2, "TH reads CurrentSaturation attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -3382,7 +3879,6 @@ class Test_TC_CC_3_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -3397,11 +3893,10 @@ class Test_TC_CC_3_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateConfigValue; chip::Optional mTimeout; - uint8_t CurrentHueValue; - uint8_t CurrentHueValueAfterStopmode; + uint8_t CurrentHueValueStep2f; + uint8_t CurrentHueValueStep3f; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -3424,24 +3919,13 @@ class Test_TC_CC_3_2Suite : 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)); - { - 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)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -3455,9 +3939,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 245U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; case 8: @@ -3469,9 +3952,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 35U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 55U)); } break; case 10: @@ -3479,18 +3961,18 @@ class Test_TC_CC_3_2Suite : public TestCommand shouldContinue = true; break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); + CurrentHueValueStep2f = value; } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; @@ -3500,23 +3982,15 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - CurrentHueValue = value; + VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueStep2f)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValue)); - } + shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -3530,9 +4004,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 20U)); } break; case 20: @@ -3544,9 +4017,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 180U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 240U)); } break; case 22: @@ -3554,18 +4026,18 @@ class Test_TC_CC_3_2Suite : public TestCommand shouldContinue = true; break; case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 180U)); + CurrentHueValueStep3f = value; } break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; @@ -3575,22 +4047,25 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - CurrentHueValueAfterStopmode = value; + VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueStep3f)); } break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } break; case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, CurrentHueValueAfterStopmode)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 29: @@ -3627,7 +4102,16 @@ class Test_TC_CC_3_2Suite : 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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -3635,33 +4119,37 @@ class Test_TC_CC_3_2Suite : 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.F00 && 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 reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); + 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 Up"); + LogStep(5, "TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(1); - value.rate = 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, @@ -3670,51 +4158,45 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } case 6: { - LogStep(6, "Wait 3000ms"); + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Wait 2000"); + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Wait 3000"); + LogStep(10, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, "TH sends MoveHue command to DUT with MoveMode Stop"); + LogStep(11, "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(0); - value.rate = 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, @@ -3722,39 +4204,56 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } + case 12: { + LogStep(12, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } case 13: { - LogStep(13, "Wait 1000ms"); + LogStep(13, "Wait 2s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } case 14: { - LogStep(14, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Wait 1000ms"); + LogStep(15, + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 60U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); } case 16: { - LogStep(16, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); + LogStep(16, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "TH sends MoveHue command to DUT with MoveMode Down"); + LogStep(17, "TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(3); - value.rate = 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, @@ -3763,51 +4262,45 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } case 18: { - LogStep(18, "Wait 1000ms"); + LogStep(18, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 19: { - LogStep(19, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "Wait 1000ms"); + LogStep(20, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 21: { - LogStep(21, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(21, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "Wait 1000ms"); + LogStep(22, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 23: { - LogStep(23, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 24: { - LogStep(24, "TH sends MoveHue command to DUT with MoveMode Stop"); + LogStep(23, "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; value.moveMode = static_cast(0); - value.rate = 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, @@ -3815,30 +4308,35 @@ class Test_TC_CC_3_2Suite : public TestCommand ); } + case 24: { + LogStep(24, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } case 25: { - LogStep(25, "Wait 1000ms"); + LogStep(25, "Wait 2s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } case 26: { - LogStep(26, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 27: { - LogStep(27, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); + LogStep(27, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); } case 28: { - LogStep(28, "TH reads CurrentHue attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + LogStep(28, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, chip::NullOptional); } case 29: { @@ -3863,12 +4361,11 @@ class Test_TC_CC_3_2Suite : public TestCommand class Test_TC_CC_3_3Suite : public TestCommand { public: - Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 13, credsIssuerConfig) + Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -3883,7 +4380,6 @@ class Test_TC_CC_3_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -3906,64 +4402,126 @@ class Test_TC_CC_3_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 215U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 245U)); } break; - case 3: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 4: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); } break; - case 5: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 6: + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, 5U)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 17U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 245U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckValue("currentHue", value, 245U)); } break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } break; - case 10: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 249U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 11: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -3994,7 +4552,16 @@ class Test_TC_CC_3_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -4002,34 +4569,38 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && 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 reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); + 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 StepHue command to DUT with StepMode Up"); + LogStep(5, "TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 (20s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type value; value.stepMode = static_cast(1); - value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; - value.transitionTime = 5U; + value.stepSize = 60U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, @@ -4038,26 +4609,76 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } case 6: { - LogStep(6, "Wait 1000ms"); + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "TH sends StepHue command to DUT with StepMode Down"); + LogStep(8, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, + "TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 50U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); + } + case 13: { + LogStep(13, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "TH sends StepHue command to DUT with StepMode=0x03 (down), StepSize=60 and TransitionTime=200 (20s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepHue::Type value; value.stepMode = static_cast(3); - value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 5U; - value.transitionTime = 5U; + value.stepSize = 60U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, @@ -4065,21 +4686,59 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 15: { + LogStep(15, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Turn off light that we turned on"); + case 17: { + LogStep(17, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 20: { + LogStep(20, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 21: { + LogStep(21, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 22: { + LogStep(22, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 23: { + LogStep(23, "Turn off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -4087,8 +4746,8 @@ class Test_TC_CC_3_3Suite : public TestCommand ); } - case 12: { - LogStep(12, "Check on/off attribute value is false after off command"); + case 24: { + LogStep(24, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -4100,7 +4759,7 @@ class Test_TC_CC_3_3Suite : public TestCommand class Test_TC_CC_4_1Suite : public TestCommand { public: - Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 10, credsIssuerConfig) + Test_TC_CC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_1", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -4143,49 +4802,91 @@ class Test_TC_CC_4_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); } break; - case 3: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 4: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; - case 5: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 6: + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 110U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 120U)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 120U)); + } + break; + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, - mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 8: + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -4216,7 +4917,16 @@ class Test_TC_CC_4_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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -4224,33 +4934,34 @@ class Test_TC_CC_4_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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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::MoveToSaturation::Type value; + value.saturation = 60U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, + value, chip::NullOptional + + ); } case 4: { - LogStep(4, "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); + 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 MoveToSaturation command to DUT"); + LogStep(5, "TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=300 (30s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; - value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U; - value.transitionTime = 10U; + value.saturation = 120U; + value.transitionTime = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, @@ -4259,20 +4970,71 @@ class Test_TC_CC_4_1Suite : public TestCommand ); } case 6: { - LogStep(6, "Wait 1500ms"); + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Turn off light that we turned on"); + LogStep(8, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 10: { + LogStep(10, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 12: { + LogStep(12, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "Turn off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -4280,8 +5042,8 @@ class Test_TC_CC_4_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Check on/off attribute value is false after off command"); + case 17: { + LogStep(17, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -4293,12 +5055,11 @@ class Test_TC_CC_4_1Suite : public TestCommand class Test_TC_CC_4_2Suite : public TestCommand { public: - Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 39, credsIssuerConfig) + Test_TC_CC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_2", 34, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4313,12 +5074,9 @@ class Test_TC_CC_4_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateConfigValue; chip::Optional mTimeout; - uint8_t CurrentSaturationStep4d; - uint8_t CurrentSaturationStep5b; - uint8_t CurrentSaturationStep5d; + uint8_t CurrentSaturationValueStep4e; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4341,24 +5099,13 @@ class Test_TC_CC_4_2Suite : 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)); - { - 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)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -4372,9 +5119,8 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 8: @@ -4386,8 +5132,7 @@ class Test_TC_CC_4_2Suite : public TestCommand { 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)); } break; @@ -4400,9 +5145,7 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckValue("currentSaturation", value, 254U)); } break; case 12: @@ -4414,13 +5157,6 @@ class Test_TC_CC_4_2Suite : public TestCommand break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -4431,9 +5167,8 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 60U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 80U)); } break; case 17: @@ -4445,61 +5180,59 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 5U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 35U)); } break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 10U)); } break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { 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)); - CurrentSaturationStep4d = value; + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; - case 25: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; - case 26: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep4d)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 170U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); + CurrentSaturationValueStep4e = value; } break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; @@ -4509,60 +5242,31 @@ class Test_TC_CC_4_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - CurrentSaturationStep5b = value; + VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationValueStep4e)); } break; case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, CurrentSaturationStep5b)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 34: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - CurrentSaturationStep5d = value; - } - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, CurrentSaturationStep5d)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 37: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 38: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -4593,7 +5297,16 @@ class Test_TC_CC_4_2Suite : 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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -4601,33 +5314,34 @@ class Test_TC_CC_4_2Suite : 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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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::MoveToSaturation::Type value; + value.saturation = 150U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, + value, chip::NullOptional + + ); } case 4: { - LogStep(4, "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); + 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 MoveSaturation command to DUT with MoveMode Up"); + LogStep(5, "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 = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.rate = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4636,171 +5350,146 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } case 6: { - LogStep(6, "Wait 1000ms"); + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "TH reads CurrentSaturation attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Wait 1000ms"); + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "TH reads CurrentSaturation attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Wait 1000ms"); + LogStep(10, "Wait 5s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "TH reads CurrentSaturation attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH sends MoveSaturation command to DUT with MoveMode Down"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(3); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; + value.saturation = 120U; + value.transitionTime = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, + value, chip::NullOptional ); } case 13: { - LogStep(13, "Wait 1000ms"); + LogStep(13, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } case 14: { - LogStep(14, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); + LogStep(14, "TH sends MoveSaturation command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; + value.moveMode = static_cast(3); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, + chip::NullOptional + + ); } case 15: { - LogStep(15, "Wait 1000ms"); + LogStep(15, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 16: { - LogStep(16, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 1000ms"); + LogStep(17, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 18: { - LogStep(18, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed Saturation"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; - value.moveMode = static_cast(1); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, - chip::NullOptional - - ); - } - case 20: { - LogStep(20, "Wait 1000ms"); + case 19: { + LogStep(19, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Maximum allowed."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "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(0); - 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 23: { - LogStep(23, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 24: { - LogStep(24, "TH reads CurrentSaturation attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 25: { - LogStep(25, "Wait 1000ms"); + case 22: { + LogStep(22, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 26: { - LogStep(26, "CurrentSaturation value Stops incrementing"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 27: { - LogStep(27, "TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation"); + case 23: { + LogStep(23, "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(3); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.moveMode = static_cast(1); + value.rate = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4808,39 +5497,26 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 28: { - LogStep(28, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 29: { - LogStep(29, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); - } - case 30: { - LogStep(30, "Wait 1000ms"); + case 24: { + LogStep(24, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "TH reads CurrentSaturation attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 25: { + LogStep(25, "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 32: { - LogStep(32, "TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the Minimum allowed"); + case 26: { + LogStep(26, "TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type value; value.moveMode = static_cast(0); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + value.rate = 5U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveSaturation::Id, value, @@ -4848,34 +5524,39 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 33: { - LogStep(33, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 34: { - LogStep(34, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 27: { + LogStep(27, "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 35: { - LogStep(35, "Wait 1000ms"); + case 28: { + LogStep(28, "Wait 2s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 36: { - LogStep(36, "CurrentSaturation value Stops decrementing"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 29: { + LogStep(29, "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 37: { - LogStep(37, "Turn off light that we turned on"); + case 30: { + LogStep(30, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 31: { + LogStep(31, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 32: { + LogStep(32, "Turn off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -4883,8 +5564,8 @@ class Test_TC_CC_4_2Suite : public TestCommand ); } - case 38: { - LogStep(38, "Check on/off attribute value is false after off command"); + case 33: { + LogStep(33, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -4896,12 +5577,11 @@ class Test_TC_CC_4_2Suite : public TestCommand class Test_TC_CC_4_3Suite : public TestCommand { public: - Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 13, credsIssuerConfig) + Test_TC_CC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_3", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -4916,7 +5596,6 @@ class Test_TC_CC_4_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -4940,24 +5619,13 @@ class Test_TC_CC_4_3Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - 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)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -4971,32 +5639,135 @@ class Test_TC_CC_4_3Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 210U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 230U)); } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 230U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 240U)); + } break; case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 240U)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 254U)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 25U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 35U)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 10U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); + } + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 10U)); + } + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 0U)); + } + break; + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 11: + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5027,7 +5798,16 @@ class Test_TC_CC_4_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -5035,34 +5815,35 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH sends MoveToSaturation command to DUT with Saturation=200 and TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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::MoveToSaturation::Type value; + value.saturation = 200U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, + value, chip::NullOptional + + ); } case 4: { - LogStep(4, "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); + 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 StepSaturation command to DUT with StepMode Up"); + LogStep(5, "TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=40 and TransitionTime=200 (20s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; value.stepMode = static_cast(1); - value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; - value.transitionTime = 10U; + value.stepSize = 40U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, @@ -5071,26 +5852,102 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } case 6: { - LogStep(6, "Wait 1000ms"); + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "Over TransitionTime,TH read CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "TH sends StepSaturation command to DUT with StepMode Down"); + LogStep(8, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 10: { + LogStep(10, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 12: { + LogStep(12, "TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=20 and TransitionTime=100 (10s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; + value.stepMode = static_cast(1); + value.stepSize = 20U; + value.transitionTime = 100U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, + chip::NullOptional + + ); + } + case 13: { + LogStep(13, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 15: { + LogStep(15, "TH sends MoveToSaturation command to DUT with Saturation=50 and TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type value; + value.saturation = 50U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToSaturation::Id, + value, chip::NullOptional + + ); + } + case 16: { + LogStep(16, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 17: { + LogStep(17, + "TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=40 and TransitionTime=200 (20s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; value.stepMode = static_cast(3); - value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 15U; - value.transitionTime = 10U; + value.stepSize = 40U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, @@ -5098,21 +5955,88 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 18: { + LogStep(18, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Over TransitionTime,TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 19: { + LogStep(19, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Turn off light that we turned on"); + case 20: { + LogStep(20, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 21: { + LogStep(21, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 22: { + LogStep(22, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 23: { + LogStep(23, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 24: { + LogStep(24, + "TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=20 and TransitionTime=100 (10 s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::StepSaturation::Type value; + value.stepMode = static_cast(3); + value.stepSize = 20U; + value.transitionTime = 100U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepSaturation::Id, value, + chip::NullOptional + + ); + } + case 25: { + LogStep(25, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 26: { + LogStep(26, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 27: { + LogStep(27, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 28: { + LogStep(28, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "Turn off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -5120,8 +6044,8 @@ class Test_TC_CC_4_3Suite : public TestCommand ); } - case 12: { - LogStep(12, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -5133,13 +6057,11 @@ class Test_TC_CC_4_3Suite : public TestCommand class Test_TC_CC_4_4Suite : public TestCommand { public: - Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 12, credsIssuerConfig) + Test_TC_CC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_4_4", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("hueConfigValue", 0, UINT8_MAX, &mHueConfigValue); - AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -5154,8 +6076,6 @@ class Test_TC_CC_4_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mHueConfigValue; - chip::Optional mSaturationConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -5179,30 +6099,20 @@ class Test_TC_CC_4_4Suite : 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)); - { - 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)); - } + 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(CheckValue("currentHue", value, 200U)); VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); @@ -5220,10 +6130,8 @@ class Test_TC_CC_4_4Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 175U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 185U)); } break; case 9: @@ -5231,17 +6139,75 @@ class Test_TC_CC_4_4Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentSaturation", value, - mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 60U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 70U)); } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 160U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 170U)); + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 70U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 80U)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, 160U)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 80U)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -5272,7 +6238,16 @@ class Test_TC_CC_4_4Suite : 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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -5280,40 +6255,43 @@ class Test_TC_CC_4_4Suite : 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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 3, "TH sends MoveToHueAndSaturation command to DUT with Hue=200, Saturation=50 and TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C06.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::MoveToHueAndSaturation::Type value; + value.hue = 200U; + value.saturation = 50U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id, + value, chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads CurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); + LogStep(5, "TH reads CurrentHue attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 6: { - LogStep(6, "TH sends MoveToHueAndSaturation command to DUT."); + LogStep(6, "TH sends MoveToHueAndSaturation command to DUT with Hue=160, Saturation=80 and TransitionTime=200 (20s)"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type value; - value.hue = mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U; - value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U; - value.transitionTime = 10U; + value.hue = 160U; + value.saturation = 80U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHueAndSaturation::Id, @@ -5322,26 +6300,76 @@ class Test_TC_CC_4_4Suite : public TestCommand ); } case 7: { - LogStep(7, "Wait 1500ms"); + LogStep(7, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Over TransitionTime, TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Turn off light that we turned on"); + LogStep(10, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 13: { + LogStep(13, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 18: { + LogStep(18, "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; @@ -5349,8 +6377,8 @@ class Test_TC_CC_4_4Suite : public TestCommand ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 19: { + LogStep(19, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -5362,7 +6390,7 @@ class Test_TC_CC_4_4Suite : public TestCommand class Test_TC_CC_5_1Suite : public TestCommand { public: - Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 50, credsIssuerConfig) + Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 58, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5404,75 +6432,76 @@ class Test_TC_CC_5_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)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("currentX", value, 32768U)); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("currentY", value, 19660U)); } break; - case 6: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 13107U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32768U)); } break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 13107U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 19660U)); } break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); + } break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15073U)); + } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -5483,7 +6512,7 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentX", value, 32768U)); + VerifyOrReturn(CheckValue("currentX", value, 13107U)); } break; case 16: @@ -5491,7 +6520,7 @@ class Test_TC_CC_5_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentY", value, 19660U)); + VerifyOrReturn(CheckValue("currentY", value, 13107U)); } break; case 17: @@ -5499,12 +6528,20 @@ class Test_TC_CC_5_1Suite : public TestCommand break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("options", value, 0U)); + } break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); { uint16_t value; @@ -5512,7 +6549,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentX", value, 32768U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5520,14 +6557,17 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentY", value, 19660U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5535,7 +6575,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentX", value, 32768U)); } break; - case 25: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5543,14 +6583,37 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentY", value, 19660U)); } break; - case 26: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentX", value, 32768U)); + } + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentY", value, 19660U)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5558,7 +6621,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentX", value, 26214U)); } break; - case 29: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5566,23 +6629,28 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentY", value, 32768U)); } break; - case 30: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("options", value, 1U)); + } break; - case 32: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 34: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5590,7 +6658,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentX", value, 32768U)); } break; - case 36: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5598,17 +6666,17 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentY", value, 19660U)); } break; - case 37: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 38: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 39: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 40: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5616,7 +6684,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentX", value, 13107U)); } break; - case 41: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5624,14 +6692,14 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentY", value, 13107U)); } break; - case 42: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 44: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5639,7 +6707,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentX", value, 13107U)); } break; - case 45: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5647,14 +6715,14 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentY", value, 13107U)); } break; - case 46: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 47: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 48: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5662,7 +6730,7 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentX", value, 26214U)); } break; - case 49: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -5670,6 +6738,24 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentY", value, 32768U)); } break; + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -5693,7 +6779,16 @@ class Test_TC_CC_5_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.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -5701,40 +6796,52 @@ class Test_TC_CC_5_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.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, + "TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC TransitionTime = 0 " + "(immediate)"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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::MoveToColor::Type value; + value.colorX = 32768U; + value.colorY = 19660U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, + chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads CurrentX attribute from 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 reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads CurrentY attribute from DUT"); + case 6: { + LogStep(6, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH sends MoveToColor command to DUT"); + case 7: { + LogStep( + 7, + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 TransitionTime = 200 (20s)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; value.colorX = 13107U; value.colorY = 13107U; - value.transitionTime = 10U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, @@ -5742,54 +6849,82 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 1500ms"); + case 8: { + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 9: { + LogStep(9, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 10: { + LogStep(10, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 11: { + LogStep(11, "Wait 10s"); 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::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - case 11: { - LogStep(11, "TH reads Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 12: { + LogStep(12, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, + chip::NullOptional); + } + case 13: { + LogStep(13, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, + chip::NullOptional); + } + case 14: { + LogStep(14, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 15: { + LogStep(15, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "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 12: { - LogStep(12, "Turn on light for color control tests"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); + case 18: { + LogStep(18, "TH read Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, + chip::NullOptional); } - case 13: { - LogStep(13, "TH sends MoveToColor command to DUT"); + case 19: { + LogStep(19, + "TH sends a MoveToColor command to the DUT with ColorX = 32768/0x8000 (x=0.5) (purple) ColorY = 19660/0x4CCC " + "(y=0.3) TransitionTime = 0 (immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -5803,27 +6938,27 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 100ms"); + case 20: { + LogStep(20, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 21: { + LogStep(21, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 22: { + LogStep(22, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "TH sends Off command to DUT"); + case 23: { + LogStep(23, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -5831,8 +6966,10 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 18: { - LogStep(18, "TH sends MoveToColor command to DUT"); + case 24: { + LogStep(24, + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 TransitionTime = 0 " + "(immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -5846,27 +6983,29 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 19: { - LogStep(19, "Wait 100ms"); + case 25: { + LogStep(25, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 26: { + LogStep(26, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 27: { + LogStep(27, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "TH sends MoveToColor command to DUT"); + case 28: { + LogStep(28, + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 TransitionTime = 0 " + "(immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -5880,27 +7019,29 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 23: { - LogStep(23, "Wait 100ms"); + case 29: { + LogStep(29, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 30: { + LogStep(30, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 31: { + LogStep(31, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "TH sends MoveToColor command to DUT"); + case 32: { + LogStep(32, + "TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 TransitionTime = 0 " + "(immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -5914,45 +7055,42 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "Wait 100ms"); + case 33: { + LogStep(33, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 28: { - LogStep(28, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 34: { + LogStep(34, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 35: { + LogStep(35, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "TH writes 1 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 36: { + LogStep(36, "TH writes 1 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; value = 1U; return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 31: { - LogStep(31, "TH reads Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 1U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); + case 37: { + LogStep(37, "TH read Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, + chip::NullOptional); } - case 32: { - LogStep(32, "Turn on light for color control tests"); + case 38: { + LogStep(38, "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; @@ -5960,8 +7098,10 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 33: { - LogStep(33, "TH sends MoveToColor command to DUT"); + case 39: { + LogStep(39, + "TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC TransitionTime = 0 " + "(immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -5975,27 +7115,27 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 34: { - LogStep(34, "Wait 100ms"); + case 40: { + LogStep(40, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 41: { + LogStep(41, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 42: { + LogStep(42, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 37: { - LogStep(37, "Turn off light that we turned on"); + case 43: { + LogStep(43, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -6003,8 +7143,10 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 38: { - LogStep(38, "TH sends MoveToColor command to DUT"); + case 44: { + LogStep(44, + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 TransitionTime = 0 " + "(immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -6018,27 +7160,29 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 39: { - LogStep(39, "Wait 100ms"); + case 45: { + LogStep(45, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 40: { - LogStep(40, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 46: { + LogStep(46, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 41: { - LogStep(41, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 47: { + LogStep(47, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "TH sends MoveToColor command to DUT"); + case 48: { + LogStep(48, + "TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 TransitionTime = 0 " + "(immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -6052,27 +7196,29 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 43: { - LogStep(43, "Wait 100ms"); + case 49: { + LogStep(49, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 44: { - LogStep(44, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 50: { + LogStep(50, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 51: { + LogStep(51, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 46: { - LogStep(46, "TH sends MoveToColor command to DUT"); + case 52: { + LogStep(52, + "TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 TransitionTime = 0 " + "(immediate)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColor::Type value; @@ -6086,25 +7232,37 @@ class Test_TC_CC_5_1Suite : public TestCommand ); } - case 47: { - LogStep(47, "Wait 100ms"); + case 53: { + LogStep(53, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 48: { - LogStep(48, "Over TransitionTime, TH reads CurrentX attribute from DUT"); + case 54: { + LogStep(54, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 49: { - LogStep(49, "Over TransitionTime, TH reads CurrentY attribute from DUT"); + case 55: { + LogStep(55, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } + case 56: { + LogStep(56, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 57: { + LogStep(57, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -6113,13 +7271,11 @@ class Test_TC_CC_5_1Suite : public TestCommand class Test_TC_CC_5_2Suite : public TestCommand { public: - Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 15, credsIssuerConfig) + Test_TC_CC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_2", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateXValue", INT16_MIN, INT16_MAX, &mRateXValue); - AddArgument("RateYValue", INT16_MIN, INT16_MAX, &mRateYValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -6134,14 +7290,10 @@ class Test_TC_CC_5_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateXValue; - chip::Optional mRateYValue; chip::Optional mTimeout; uint16_t CurrentXValue; uint16_t CurrentYValue; - uint16_t CurrentXBeforeStopCommand; - uint16_t CurrentYBeforeStopCommand; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -6164,93 +7316,128 @@ class Test_TC_CC_5_2Suite : 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)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - CurrentXValue = value; + VerifyOrReturn(CheckConstraintMinValue("value", value, 31500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32500U)); } break; - case 5: + 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)); - CurrentYValue = value; + VerifyOrReturn(CheckConstraintMinValue("value", value, 26500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 27500U)); } break; - case 6: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 7: + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 30500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 31500U)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 28500U)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - CurrentXBeforeStopCommand = value; + VerifyOrReturn(CheckConstraintMinValue("value", value, 29500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 30500U)); + CurrentXValue = value; } break; - case 9: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - CurrentYBeforeStopCommand = value; + VerifyOrReturn(CheckConstraintMinValue("value", value, 28500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 29500U)); + CurrentYValue = value; } break; - case 10: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXBeforeStopCommand)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 29500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 30500U)); } break; - case 12: + 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, CurrentYBeforeStopCommand)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 28500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 29500U)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 13: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6281,7 +7468,16 @@ class Test_TC_CC_5_2Suite : 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.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -6289,39 +7485,35 @@ class Test_TC_CC_5_2Suite : 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.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 26000 TransitionTime = 0 (immediate)"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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::MoveToColor::Type value; + value.colorX = 33000U; + value.colorY = 26000U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, + chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "TH sends MoveColor command to DUT"); + LogStep(5, "TH sends MoveColor command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveColor::Type value; - value.rateX = mRateXValue.HasValue() ? mRateXValue.Value() : 50; - value.rateY = mRateYValue.HasValue() ? mRateYValue.Value() : 50; + value.rateX = -100; + value.rateY = 100; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveColor::Id, value, @@ -6329,27 +7521,65 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 1000ms"); + case 6: { + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads CurrentX attribute from DUT"); + case 7: { + LogStep(7, "TH reads CurrentX attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH reads CurrentY attribute from DUT"); + case 8: { + LogStep(8, "TH reads CurrentY attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } + case 9: { + LogStep(9, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } case 10: { - LogStep(10, "TH sends StopMoveStep command to DUT"); + LogStep(10, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, + chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, + chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, "TH sends StopMoveStep command to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type value; @@ -6360,20 +7590,32 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 16: { + LogStep(16, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 17: { + LogStep(17, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Turn off light that we turned on"); + case 18: { + LogStep(18, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 20: { + LogStep(20, "Turn off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -6381,8 +7623,8 @@ class Test_TC_CC_5_2Suite : public TestCommand ); } - case 14: { - LogStep(14, "Check on/off attribute value is false after off command"); + case 21: { + LogStep(21, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -6394,13 +7636,11 @@ class Test_TC_CC_5_2Suite : public TestCommand class Test_TC_CC_5_3Suite : public TestCommand { public: - Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 12, credsIssuerConfig) + Test_TC_CC_5_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_3", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepXConfigValue", INT16_MIN, INT16_MAX, &mStepXConfigValue); - AddArgument("StepYConfigValue", INT16_MIN, INT16_MAX, &mStepYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -6415,13 +7655,8 @@ class Test_TC_CC_5_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mStepXConfigValue; - chip::Optional mStepYConfigValue; chip::Optional mTimeout; - uint16_t CurrentXValue; - uint16_t CurrentYValue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -6443,68 +7678,103 @@ class Test_TC_CC_5_3Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - CurrentXValue = value; + VerifyOrReturn(CheckConstraintMinValue("value", value, 13000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 33000U)); } break; - case 5: + 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)); - CurrentYValue = value; + VerifyOrReturn(CheckConstraintMinValue("value", value, 14000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 20000U)); } break; - case 6: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 7: + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 13000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 14000U)); + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 14000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15000U)); + } + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentXValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("currentX", value, 13000U)); } break; - case 9: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, CurrentYValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckValue("currentY", value, 14000U)); } break; - case 10: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } break; - case 11: + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6535,7 +7805,16 @@ class Test_TC_CC_5_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -6543,40 +7822,36 @@ class Test_TC_CC_5_3Suite : public TestCommand ); } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 20000 TransitionTime = 0 (immediate)"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - 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::MoveToColor::Type value; + value.colorX = 33000U; + value.colorY = 20000U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColor::Id, value, + chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "TH sends StepColor command to DUT"); + LogStep(5, "TH sends StepColor command to DUT, with StepX = -2000, StepY = -6000, TransitionTime = 200 (20s)"); VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::StepColor::Type value; - value.stepX = mStepXConfigValue.HasValue() ? mStepXConfigValue.Value() : 100; - value.stepY = mStepYConfigValue.HasValue() ? mStepYConfigValue.Value() : 100; - value.transitionTime = 10U; + value.stepX = -20000; + value.stepY = -6000; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColor::Id, value, @@ -6584,27 +7859,77 @@ class Test_TC_CC_5_3Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 1500ms"); + case 6: { + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "Over TransitionTime, TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Over TransitionTime, TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } + case 9: { + LogStep(9, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } case 10: { - LogStep(10, "Turn off light that we turned on"); + LogStep(10, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, + chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, + chip::NullOptional); + } + case 14: { + LogStep(14, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "Turn off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -6612,8 +7937,8 @@ class Test_TC_CC_5_3Suite : public TestCommand ); } - case 11: { - LogStep(11, "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); } @@ -6625,7 +7950,7 @@ class Test_TC_CC_5_3Suite : public TestCommand class Test_TC_CC_6_1Suite : public TestCommand { public: - Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 12, credsIssuerConfig) + Test_TC_CC_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_1", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6670,16 +7995,8 @@ class Test_TC_CC_6_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)); { uint16_t value; @@ -6690,7 +8007,7 @@ class Test_TC_CC_6_1Suite : public TestCommand ColorTempPhysicalMinMiredsValue = value; } break; - case 5: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6701,7 +8018,7 @@ class Test_TC_CC_6_1Suite : public TestCommand ColorTempPhysicalMaxMiredsValue = value; } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6711,28 +8028,89 @@ class Test_TC_CC_6_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorTemperature", value, ColorTempPhysicalMaxMiredsValue)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 280U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 300U)); } break; - case 10: + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 260U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 280U)); + } break; - case 11: + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 250U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 260U)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("colorTemperature", value, 250U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -6763,7 +8141,16 @@ class Test_TC_CC_6_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.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -6771,45 +8158,33 @@ class Test_TC_CC_6_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.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Move To Color Temperature command"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, + "TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=310 and TransitionTime=0 " + "(immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperature = ColorTempPhysicalMaxMiredsValue; - value.transitionTime = 10U; + value.colorTemperature = 310U; + value.transitionTime = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, @@ -6817,21 +8192,94 @@ class Test_TC_CC_6_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1500ms"); + case 7: { + LogStep(7, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } + case 8: { + LogStep(8, + "TH sends MoveToColorTemperatur command to DUT with ColorTemperatureMireds=250 and TransitionTime=300 (30s)."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; + value.colorTemperature = 250U; + value.transitionTime = 300U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, + value, chip::NullOptional + + ); + } case 9: { - LogStep(9, "Read current color temprature"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 10: { + LogStep(10, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Turn off light that we turned on"); + case 11: { + LogStep(11, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + true, chip::NullOptional); + } + case 13: { + LogStep(13, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + true, chip::NullOptional); + } + case 15: { + LogStep(15, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + true, chip::NullOptional); + } + case 17: { + LogStep(17, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 18: { + LogStep(18, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "Turn Off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -6839,8 +8287,8 @@ class Test_TC_CC_6_1Suite : public TestCommand ); } - case 11: { - LogStep(11, "Check on/off attribute value is false after off command"); + case 20: { + LogStep(20, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -6852,7 +8300,7 @@ class Test_TC_CC_6_1Suite : public TestCommand class Test_TC_CC_6_2Suite : public TestCommand { public: - Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 39, credsIssuerConfig) + Test_TC_CC_6_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_2", 38, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6899,16 +8347,8 @@ class Test_TC_CC_6_2Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6919,7 +8359,7 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTempPhysicalMinMiredsValue = value; } break; - case 5: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6930,7 +8370,7 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTempPhysicalMaxMiredsValue = value; } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6940,14 +8380,14 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6957,11 +8397,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6971,11 +8411,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -6985,14 +8425,14 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7002,11 +8442,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 17: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7016,11 +8456,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 19: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7030,17 +8470,17 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7051,11 +8491,11 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTemperatureValue = value; } break; - case 25: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 26: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7066,11 +8506,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 27: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 28: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7081,17 +8521,17 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 29: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 32: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7102,11 +8542,11 @@ class Test_TC_CC_6_2Suite : public TestCommand ColorTemperatureMoveModeStop = value; } break; - case 33: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 34: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7117,11 +8557,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 35: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 36: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7132,10 +8572,10 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 37: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 38: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7166,7 +8606,16 @@ class Test_TC_CC_6_2Suite : 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.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -7174,41 +8623,27 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); + case 5: { + LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -7222,48 +8657,48 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 8: { - LogStep(8, "Wait 1000ms"); + case 7: { + LogStep(7, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } - case 10: { - LogStep(10, "Wait 1000ms"); + case 9: { + LogStep(9, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 11: { - LogStep(11, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } - case 12: { - LogStep(12, "Wait 1000ms"); + case 11: { + LogStep(11, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } - case 14: { - LogStep(14, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -7277,48 +8712,48 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 15: { - LogStep(15, "Wait 1000ms"); + case 14: { + LogStep(14, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } - case 17: { - LogStep(17, "Wait 1000ms"); + case 16: { + LogStep(16, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } - case 19: { - LogStep(19, "Wait 1000ms"); + case 18: { + LogStep(18, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 21: { - LogStep(21, "TH sends MoveColorTemperature command to DUT with MoveMode = Up"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -7332,9 +8767,9 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 22: { - LogStep(22, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -7348,48 +8783,48 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 23: { - LogStep(23, "Wait 1000ms"); + case 22: { + LogStep(22, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 25: { - LogStep(25, "Wait 1000ms"); + case 24: { + LogStep(24, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 26: { - LogStep(26, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 27: { - LogStep(27, "Wait 1000ms"); + case 26: { + LogStep(26, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 28: { - LogStep(28, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 29: { - LogStep(29, "TH sends MoveColorTemperature command to DUT with MoveMode = Down"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -7403,9 +8838,9 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 30: { - LogStep(30, "TH sends MoveColorTemperature command to DUT with MoveMode = Stop"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -7419,47 +8854,47 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 31: { - LogStep(31, "Wait 1000ms"); + case 30: { + LogStep(30, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 32: { - LogStep(32, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 33: { - LogStep(33, "Wait 1000ms"); + case 32: { + LogStep(32, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 34: { - LogStep(34, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } - case 35: { - LogStep(35, "Wait 1000ms"); + case 34: { + LogStep(34, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 36: { - LogStep(36, "Read current color temprature attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); } - case 37: { - LogStep(37, "Turn off light that we turned on"); + case 36: { + LogStep(36, "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; @@ -7467,8 +8902,8 @@ class Test_TC_CC_6_2Suite : public TestCommand ); } - case 38: { - LogStep(38, "Check on/off attribute value is false after off command"); + case 37: { + LogStep(37, "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); } @@ -7480,7 +8915,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", 23, credsIssuerConfig) + Test_TC_CC_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_6_3", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -7525,16 +8960,8 @@ class Test_TC_CC_6_3Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7545,7 +8972,7 @@ class Test_TC_CC_6_3Suite : public TestCommand ColorTempPhysicalMinMiredsValue = value; } break; - case 5: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7556,7 +8983,7 @@ class Test_TC_CC_6_3Suite : public TestCommand ColorTempPhysicalMaxMiredsValue = value; } break; - case 6: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7566,14 +8993,14 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, ColorTempPhysicalMaxMiredsValue)); } break; - case 7: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7583,11 +9010,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7597,11 +9024,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7611,14 +9038,28 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + 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 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7628,11 +9069,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -7642,24 +9083,404 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH sends On command to DUT"); + VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); + } + case 3: { + LogStep(3, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads ColorTemperatureMireds attribute from DUT."); + VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + true, chip::NullOptional); + } + case 6: { + LogStep(6, "TH sends 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 + + ); + } + case 7: { + LogStep(7, "Wait 500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(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); + } + case 9: { + LogStep(9, "Wait 500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(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); + } + case 11: { + LogStep(11, "Wait 700ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 700UL; + return WaitForMs(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); + } + 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 + + ); + } + case 14: { + LogStep(14, "Wait 500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(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); + } + case 16: { + LogStep(16, "Wait 500ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 500UL; + return WaitForMs(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"); + VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional + + ); + } + case 21: { + LogStep(21, "Check on/off attribute value is false after off command"); + VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CC_7_2Suite : public TestCommand +{ +public: + Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 31, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_CC_7_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 22500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 27500U)); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 27500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32500U)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 34000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 36000U)); + } + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 34500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 36000U)); + } + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 17500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 22500U)); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 12500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 17500U)); + } + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 9500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12500U)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 9500U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12500U)); + } + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 28: 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(CheckConstraintMaxValue("value", value, 3U)); } break; - case 21: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -7690,7 +9511,16 @@ class Test_TC_CC_6_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -7698,152 +9528,228 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=20000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 20000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH reads ColorTempPhysicalMaxMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); + LogStep(5, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=500 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(1); + value.rate = 500U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional + + ); } case 6: { - LogStep(6, "TH reads ColorTemperatureMireds attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + LogStep(6, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "TH sends StepColorTemperature command to DUT with MoveMode = Up"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type value; - value.stepMode = static_cast(1); - value.stepSize = 100U; - value.transitionTime = 15U; - value.colorTemperatureMinimumMireds = ColorTempPhysicalMinMiredsValue; - value.colorTemperatureMaximumMireds = ColorTempPhysicalMaxMiredsValue; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepColorTemperature::Id, - value, chip::NullOptional - - ); + LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); } case 8: { - LogStep(8, "Wait 500ms"); + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Wait 500ms"); + LogStep(10, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, - true, chip::NullOptional); + LogStep(11, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional + + ); } case 12: { - LogStep(12, "Wait 700ms"); + LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 13: { + LogStep(13, "Wait 2s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 700UL; + value.ms = 2000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + case 14: { + LogStep(14, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "TH sends StepColorTemperature command to DUT with MoveMode = Down"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::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, + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 25000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, value, chip::NullOptional ); } - case 15: { - LogStep(15, "Wait 500ms"); + case 16: { + LogStep(16, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + case 17: { + LogStep(17, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x03 (down) and Rate=500 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(3); + value.rate = 500U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional + + ); + } + case 18: { + LogStep(18, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait 500ms"); + case 20: { + LogStep(20, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + case 21: { + LogStep(21, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait 500ms"); + case 22: { + LogStep(22, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "TH reads ColorTemperatureMireds attribute from DUT several times"); - VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, + case 23: { + LogStep(23, "TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + chip::NullOptional + + ); + } + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Turn off light that we turned on"); + case 25: { + LogStep(25, "Wait 2s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 26: { + LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 27: { + LogStep(27, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 28: { + LogStep(28, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 29: { + LogStep(29, "Turn Off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -7851,8 +9757,8 @@ class Test_TC_CC_6_3Suite : public TestCommand ); } - case 22: { - LogStep(22, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -7861,19 +9767,18 @@ class Test_TC_CC_6_3Suite : public TestCommand } }; -class Test_TC_CC_7_2Suite : public TestCommand +class Test_TC_CC_7_3Suite : public TestCommand { public: - Test_TC_CC_7_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_2", 29, credsIssuerConfig) + Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 29, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT16_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_7_2Suite() {} + ~Test_TC_CC_7_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -7884,12 +9789,8 @@ class Test_TC_CC_7_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateConfigValue; chip::Optional mTimeout; - uint16_t EnhancedCurrentHueStep3b; - uint16_t EnhancedCurrentHueStep5b; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -7911,24 +9812,13 @@ class Test_TC_CC_7_2Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -7942,9 +9832,8 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9000U)); } break; case 8: @@ -7956,9 +9845,8 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 9000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 11000U)); } break; case 10: @@ -7970,39 +9858,28 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12000U)); } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - EnhancedCurrentHueStep3b = value; + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 12000U)); } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueStep3b)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } + shouldContinue = true; break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8016,9 +9893,8 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 9000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 11000U)); } break; case 19: @@ -8030,9 +9906,8 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9000U)); } break; case 21: @@ -8044,38 +9919,38 @@ class Test_TC_CC_7_2Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 6000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7000U)); } break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - EnhancedCurrentHueStep5b = value; + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 6000U)); } break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } break; case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, EnhancedCurrentHueStep5b)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 27: @@ -8112,7 +9987,16 @@ class Test_TC_CC_7_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -8120,200 +10004,205 @@ class Test_TC_CC_7_2Suite : 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.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 6000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); + 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 EnhancedMoveHue command to DUT with MoveMode Up"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, + "TH sends EnhancedStepHue command to DUT with StepMode=0x01 (up), StepSize=6000 and TransitionTime=300 (30s)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; + value.stepMode = static_cast(1); + value.stepSize = 6000U; + value.transitionTime = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, chip::NullOptional ); } case 6: { - LogStep(6, "Wait 1000ms"); + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT several times."); + LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Wait 1000ms"); + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT several times."); + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Wait 1000ms"); + LogStep(10, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT several times."); + LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Wait 5s"); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); } case 13: { - LogStep(13, "TH reads EnhancedCurrentHue attribute from DUT several times"); + LogStep(13, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Wait 1000ms"); + LogStep(14, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 12000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); } case 15: { - LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); + LogStep(15, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 16: { - LogStep(16, "TH sends EnhancedMoveHue command to DUT with MoveMode Down"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep( + 16, + "TH sends EnhancedStepHue command to DUT with StepMode=0x03 (down), StepSize=6000 and TransitionTime=300 (30s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(3); - value.rate = mRateConfigValue.HasValue() ? mRateConfigValue.Value() : 50U; + chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; + value.stepMode = static_cast(3); + value.stepSize = 6000U; + value.transitionTime = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, chip::NullOptional ); } case 17: { - LogStep(17, "Wait 500ms"); + LogStep(17, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 18: { - LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT several times"); + LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 19: { - LogStep(19, "Wait 500ms"); + LogStep(19, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 20: { - LogStep(20, "TH reads EnhancedCurrentHue attribute from DUT several times"); + LogStep(20, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "Wait 500ms"); + LogStep(21, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } case 22: { - LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT several times"); + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "TH sends EnhancedMoveHue command to DUT with MoveMode Stop"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "Wait 5s"); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveHue::Id, value, - chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); } case 24: { - LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT several times."); + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Wait 1000ms"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs(kIdentityAlpha, value); + LogStep(25, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); } case 26: { - LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT several times."); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); + LogStep(26, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); } case 27: { - LogStep(27, "Turn off light that we turned on"); + LogStep(27, "Turn Off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -8331,19 +10220,18 @@ class Test_TC_CC_7_2Suite : public TestCommand } }; -class Test_TC_CC_7_3Suite : public TestCommand +class Test_TC_CC_7_4Suite : public TestCommand { public: - Test_TC_CC_7_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_3", 13, credsIssuerConfig) + Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 21, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepSizeConfigValue", 0, UINT16_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_7_3Suite() {} + ~Test_TC_CC_7_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -8354,7 +10242,6 @@ class Test_TC_CC_7_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -8377,64 +10264,122 @@ class Test_TC_CC_7_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 20000U)); } break; - case 3: + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 50U)); + } + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 4: + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 17000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 19000U)); } break; - case 5: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 56U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 74U)); + } break; - case 6: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 16000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 17000U)); } break; - case 8: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 80U)); + } break; - case 9: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + 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(CheckValue("enhancedCurrentHue", value, 16000U)); + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentSaturation", value, 80U)); + } + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 11: + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -8465,21 +10410,7 @@ class Test_TC_CC_7_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Turn on light for color control tests"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); + LogStep(1, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -8487,266 +10418,139 @@ class Test_TC_CC_7_3Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 4: { - LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); + case 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; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); } - case 5: { - LogStep(5, "TH sends EnhancedStepHue command to DUT with StepMode Up"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 3: { + LogStep(3, + "TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=20000, Saturation=50 and " + "TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; - value.stepMode = static_cast(0); - value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; - value.transitionTime = 10U; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; + value.enhancedHue = 20000U; + value.saturation = 50U; + value.transitionTime = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, - chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional ); } - case 6: { - LogStep(6, "Wait 1000ms"); + case 4: { + LogStep(4, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 5: { + LogStep(5, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH sends EnhancedStepHue command to DUT with StepMode Down"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 7: { + LogStep(7, + "TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=16000, Saturation=80 and " + "TransitionTime=200 (20s)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type value; - value.stepMode = static_cast(1); - value.stepSize = mStepSizeConfigValue.HasValue() ? mStepSizeConfigValue.Value() : 50U; - value.transitionTime = 10U; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; + value.enhancedHue = 16000U; + value.saturation = 80U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedStepHue::Id, value, - chip::NullOptional + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional ); } - case 9: { - LogStep(9, "Wait 1000ms"); + case 8: { + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Over TransitionTime,Read EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 9: { + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } + case 10: { + LogStep(10, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } case 11: { - LogStep(11, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "Wait 10s"); ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 12: { - LogStep(12, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_7_4Suite : public TestCommand -{ -public: - Test_TC_CC_7_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_4", 10, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); - AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_7_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mEnhancedHueConfigValue; - chip::Optional mSaturationConfigValue; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, - mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Turn on light for color control tests"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads EnhancedCurrentHue attribute from DUT"); + LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends EnhancedMoveToHueAndSaturation command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type value; - value.enhancedHue = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U; - value.saturation = mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U; - value.transitionTime = 10U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Commands::EnhancedMoveToHueAndSaturation::Id, value, chip::NullOptional - - ); + case 13: { + LogStep(13, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); } - case 6: { - LogStep(6, "Wait 1500ms"); + case 14: { + LogStep(14, "Wait 5s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Check EnhancedCurrentHue attribute value matched the value sent by the last command"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 15: { + LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Turn off light that we turned on"); + case 16: { + LogStep(16, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 17: { + LogStep(17, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 18: { + LogStep(18, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "Turn Off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -8754,8 +10558,8 @@ class Test_TC_CC_7_4Suite : public TestCommand ); } - case 9: { - LogStep(9, "Check on/off attribute value is false after off command"); + case 20: { + LogStep(20, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -9321,7 +11125,7 @@ class Test_TC_CC_8_1Suite : public TestCommand } case 26: { LogStep(26, "TH sends MoveColorTemperature command to DUT"); - VerifyOrDo(!ShouldSkip("CC.S.C4B.Rsp && CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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); @@ -9346,7 +11150,7 @@ class Test_TC_CC_8_1Suite : public TestCommand } 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)); + 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); } @@ -10747,7 +12551,7 @@ class Test_TC_CNET_1_3Suite : public TestCommand class Test_TC_DESC_1_1Suite : public TestCommand { public: - Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 7, credsIssuerConfig) + Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DESC_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -10843,10 +12647,6 @@ class Test_TC_DESC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -10894,17 +12694,6 @@ class Test_TC_DESC_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -11600,7 +13389,7 @@ class Test_TC_DGETH_2_2Suite : public TestCommand class Test_TC_FLW_1_1Suite : public TestCommand { public: - Test_TC_FLW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_1_1", 8, credsIssuerConfig) + Test_TC_FLW_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -11704,10 +13493,6 @@ class Test_TC_FLW_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -11761,17 +13546,6 @@ class Test_TC_FLW_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), FlowMeasurement::Id, FlowMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -11911,7 +13685,7 @@ class Test_TC_FLW_2_1Suite : public TestCommand class Test_TC_CGEN_1_1Suite : public TestCommand { public: - Test_TC_CGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_1_1", 7, credsIssuerConfig) + Test_TC_CGEN_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CGEN_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12006,10 +13780,6 @@ class Test_TC_CGEN_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -12057,17 +13827,6 @@ class Test_TC_CGEN_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GeneralCommissioning::Id, GeneralCommissioning::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -12675,7 +14434,7 @@ class Test_TC_DGGEN_2_1Suite : public TestCommand class Test_TC_I_1_1Suite : public TestCommand { public: - Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 11, credsIssuerConfig) + Test_TC_I_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_1_1", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12807,10 +14566,6 @@ class Test_TC_I_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -12883,17 +14638,6 @@ class Test_TC_I_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Identify::Id, Identify::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -13596,7 +15340,7 @@ class Test_TC_I_2_3Suite : public TestCommand class Test_TC_ILL_1_1Suite : public TestCommand { public: - Test_TC_ILL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_1_1", 9, credsIssuerConfig) + Test_TC_ILL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ILL_1_1", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -13709,10 +15453,6 @@ class Test_TC_ILL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -13772,17 +15512,6 @@ class Test_TC_ILL_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), IlluminanceMeasurement::Id, IlluminanceMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -13938,7 +15667,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand class Test_TC_LVL_1_1Suite : public TestCommand { public: - Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 16, credsIssuerConfig) + Test_TC_LVL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_1_1", 15, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -14117,10 +15846,6 @@ class Test_TC_LVL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -14223,17 +15948,6 @@ class Test_TC_LVL_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -16856,7 +18570,7 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand { public: Test_TC_LOWPOWER_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_LOWPOWER_1_1", 7, credsIssuerConfig) + TestCommand("Test_TC_LOWPOWER_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -16959,10 +18673,6 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17010,17 +18720,6 @@ class Test_TC_LOWPOWER_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -17030,7 +18729,7 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand { public: Test_TC_KEYPADINPUT_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_1_2", 7, credsIssuerConfig) + TestCommand("Test_TC_KEYPADINPUT_1_2", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17117,10 +18816,6 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17170,17 +18865,6 @@ class Test_TC_KEYPADINPUT_1_2Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), KeypadInput::Id, KeypadInput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -17190,7 +18874,7 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand { public: Test_TC_APPLAUNCHER_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_APPLAUNCHER_1_3", 10, credsIssuerConfig) + TestCommand("Test_TC_APPLAUNCHER_1_3", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17305,10 +18989,6 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17375,17 +19055,6 @@ class Test_TC_APPLAUNCHER_1_3Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ApplicationLauncher::Id, ApplicationLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -17395,7 +19064,7 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand { public: Test_TC_MEDIAINPUT_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAINPUT_1_4", 9, credsIssuerConfig) + TestCommand("Test_TC_MEDIAINPUT_1_4", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17506,10 +19175,6 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17569,17 +19234,6 @@ class Test_TC_MEDIAINPUT_1_4Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaInput::Id, MediaInput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -17589,7 +19243,7 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand { public: Test_TC_WAKEONLAN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WAKEONLAN_1_5", 8, credsIssuerConfig) + TestCommand("Test_TC_WAKEONLAN_1_5", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17690,10 +19344,6 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17747,17 +19397,6 @@ class Test_TC_WAKEONLAN_1_5Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -17767,7 +19406,7 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand { public: Test_TC_CHANNEL_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CHANNEL_1_6", 12, credsIssuerConfig) + TestCommand("Test_TC_CHANNEL_1_6", 11, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -17899,10 +19538,6 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -17983,17 +19618,6 @@ class Test_TC_CHANNEL_1_6Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Channel::Id, Channel::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -18003,7 +19627,7 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand { public: Test_TC_MEDIAPLAYBACK_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 21, credsIssuerConfig) + TestCommand("Test_TC_MEDIAPLAYBACK_1_7", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18219,10 +19843,6 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -18355,17 +19975,6 @@ class Test_TC_MEDIAPLAYBACK_1_7Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), MediaPlayback::Id, MediaPlayback::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -18375,7 +19984,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand { public: Test_TC_AUDIOOUTPUT_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_AUDIOOUTPUT_1_8", 8, credsIssuerConfig) + TestCommand("Test_TC_AUDIOOUTPUT_1_8", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18481,10 +20090,6 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -18539,17 +20144,6 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), AudioOutput::Id, AudioOutput::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -18558,7 +20152,7 @@ class Test_TC_AUDIOOUTPUT_1_8Suite : public TestCommand class Test_TC_TGTNAV_1_9Suite : public TestCommand { public: - Test_TC_TGTNAV_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TGTNAV_1_9", 8, credsIssuerConfig) + Test_TC_TGTNAV_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TGTNAV_1_9", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18654,10 +20248,6 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -18711,17 +20301,6 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TargetNavigator::Id, TargetNavigator::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -18730,7 +20309,7 @@ class Test_TC_TGTNAV_1_9Suite : public TestCommand class Test_TC_APBSC_1_10Suite : public TestCommand { public: - Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 10, credsIssuerConfig) + Test_TC_APBSC_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_APBSC_1_10", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -18854,10 +20433,6 @@ class Test_TC_APBSC_1_10Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -18923,17 +20498,6 @@ class Test_TC_APBSC_1_10Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(3), ApplicationBasic::Id, ApplicationBasic::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -18943,7 +20507,7 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand { public: Test_TC_CONTENTLAUNCHER_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CONTENTLAUNCHER_1_11", 10, credsIssuerConfig) + TestCommand("Test_TC_CONTENTLAUNCHER_1_11", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -19057,10 +20621,6 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -19128,17 +20688,6 @@ class Test_TC_CONTENTLAUNCHER_1_11Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ContentLauncher::Id, ContentLauncher::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -19148,7 +20697,7 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand { public: Test_TC_ALOGIN_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ALOGIN_1_12", 7, credsIssuerConfig) + TestCommand("Test_TC_ALOGIN_1_12", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -19236,10 +20785,6 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -19287,17 +20832,6 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -22818,7 +24352,7 @@ class Test_TC_CONTENTLAUNCHER_10_1Suite : public TestCommand class Test_TC_MOD_1_1Suite : public TestCommand { public: - Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_1", 10, credsIssuerConfig) + Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -22938,10 +24472,6 @@ class Test_TC_MOD_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -23008,17 +24538,6 @@ class Test_TC_MOD_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ModeSelect::Id, ModeSelect::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -23289,7 +24808,7 @@ class OTA_SuccessfulTransferSuite : public TestCommand class Test_TC_OCC_1_1Suite : public TestCommand { public: - Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 7, credsIssuerConfig) + Test_TC_OCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OCC_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -23384,10 +24903,6 @@ class Test_TC_OCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -23435,17 +24950,6 @@ class Test_TC_OCC_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OccupancySensing::Id, OccupancySensing::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -23717,7 +25221,7 @@ class Test_TC_OCC_2_1Suite : public TestCommand class Test_TC_OO_1_1Suite : public TestCommand { public: - Test_TC_OO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_1_1", 10, credsIssuerConfig) + Test_TC_OO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_OO_1_1", 9, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -23841,10 +25345,6 @@ class Test_TC_OO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -23911,17 +25411,6 @@ class Test_TC_OO_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -24859,7 +26348,7 @@ class Test_TC_OO_2_4Suite : public TestCommand class Test_TC_PS_1_1Suite : public TestCommand { public: - Test_TC_PS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_1_1", 11, credsIssuerConfig) + Test_TC_PS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_1_1", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -24995,10 +26484,6 @@ class Test_TC_PS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -25071,17 +26556,6 @@ class Test_TC_PS_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PowerSource::Id, PowerSource::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -25636,7 +27110,7 @@ class Test_TC_PS_2_1Suite : public TestCommand class Test_TC_PRS_1_1Suite : public TestCommand { public: - Test_TC_PRS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_1_1", 14, credsIssuerConfig) + Test_TC_PRS_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_1_1", 13, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -25794,10 +27268,6 @@ class Test_TC_PRS_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -25888,17 +27358,6 @@ class Test_TC_PRS_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PressureMeasurement::Id, PressureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -26118,7 +27577,7 @@ class Test_TC_PRS_2_1Suite : public TestCommand class Test_TC_PCC_1_1Suite : public TestCommand { public: - Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 23, credsIssuerConfig) + Test_TC_PCC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_1_1", 22, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26361,10 +27820,6 @@ class Test_TC_PCC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -26508,16 +27963,6 @@ class Test_TC_PCC_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), PumpConfigurationAndControl::Id, PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "TH reads the EventList attribute from the DUT"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -27635,7 +29080,7 @@ class Test_TC_PCC_2_4Suite : public TestCommand class Test_TC_PSCFG_1_1Suite : public TestCommand { public: - Test_TC_PSCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_1_1", 7, credsIssuerConfig) + Test_TC_PSCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27728,10 +29173,6 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -27779,17 +29220,6 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -27798,7 +29228,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand class Test_TC_RH_1_1Suite : public TestCommand { public: - Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 8, credsIssuerConfig) + Test_TC_RH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_RH_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -27902,10 +29332,6 @@ class Test_TC_RH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -27959,17 +29385,6 @@ class Test_TC_RH_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -28958,7 +30373,7 @@ class Test_TC_SC_4_2Suite : public TestCommand class Test_TC_SWTCH_1_1Suite : public TestCommand { public: - Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 13, credsIssuerConfig) + Test_TC_SWTCH_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_1_1", 12, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -29088,10 +30503,6 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -29192,17 +30603,6 @@ class Test_TC_SWTCH_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Switch::Id, Switch::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -29327,7 +30727,7 @@ class Test_TC_SWTCH_2_1Suite : public TestCommand class Test_TC_TMP_1_1Suite : public TestCommand { public: - Test_TC_TMP_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_1_1", 8, credsIssuerConfig) + Test_TC_TMP_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -29431,10 +30831,6 @@ class Test_TC_TMP_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -29488,17 +30884,6 @@ class Test_TC_TMP_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -32205,7 +33590,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand class Test_TC_TSUIC_1_1Suite : public TestCommand { public: - Test_TC_TSUIC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_1_1", 7, credsIssuerConfig) + Test_TC_TSUIC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -32300,10 +33685,6 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -32353,17 +33734,6 @@ class Test_TC_TSUIC_1_1Suite : public TestCommand ThermostatUserInterfaceConfiguration::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -34402,7 +35772,7 @@ class Test_TC_DGTHREAD_2_4Suite : public TestCommand class Test_TC_ULABEL_1_1Suite : public TestCommand { public: - Test_TC_ULABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_1_1", 7, credsIssuerConfig) + Test_TC_ULABEL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ULABEL_1_1", 6, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -34495,10 +35865,6 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -34546,17 +35912,6 @@ class Test_TC_ULABEL_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), UserLabel::Id, UserLabel::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, - "Read EventList attribute from the DUT and Verify that the DUT response provides a list of supported events."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -35413,7 +36768,7 @@ class Test_TC_DGWIFI_2_3Suite : public TestCommand class Test_TC_WNCV_1_1Suite : public TestCommand { public: - Test_TC_WNCV_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_1_1", 15, credsIssuerConfig) + Test_TC_WNCV_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_WNCV_1_1", 14, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -35504,8 +36859,6 @@ class Test_TC_WNCV_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); VerifyOrReturn(CheckConstraintContains("value", value, 16UL)); VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); } @@ -35516,10 +36869,8 @@ class Test_TC_WNCV_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); } break; case 7: @@ -35528,7 +36879,8 @@ class Test_TC_WNCV_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 19UL)); } break; case 8: @@ -35537,38 +36889,37 @@ class Test_TC_WNCV_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); } break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 12: @@ -35577,9 +36928,7 @@ class Test_TC_WNCV_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); } break; case 13: @@ -35594,10 +36943,6 @@ class Test_TC_WNCV_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -35652,45 +36997,45 @@ class Test_TC_WNCV_1_1Suite : public TestCommand true, chip::NullOptional); } case 6: { - LogStep(6, "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } case 7: { - LogStep(7, "Read the Feature dependent(WNCV.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } case 8: { - LogStep(8, "Read the Feature dependent(WNCV.S.F00) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList"); + VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the Feature dependent(WNCV.S.F01) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(9, "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute"); + VerifyOrDo(!ShouldSkip("WNCV.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, + WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F00 && WNCV.S.F00 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(10, "TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, + WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 11: { - LogStep(11, "Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList"); - VerifyOrDo(!ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(11, "TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, + WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute"); - VerifyOrDo(!ShouldSkip("WNCV.S.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } @@ -35700,16 +37045,6 @@ class Test_TC_WNCV_1_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WindowCovering::Id, WindowCovering::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "TH reads from the DUT the (0xFFFA) EventList attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && WNCV.S.Afffa"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } } return CHIP_NO_ERROR; } @@ -78552,7 +79887,7 @@ class Test_TC_CADMIN_1_22Suite : public TestCommand class Test_TC_CADMIN_1_3Suite : public TestCommand { public: - Test_TC_CADMIN_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_3", 17, credsIssuerConfig) + Test_TC_CADMIN_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_3", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -78592,11 +79927,19 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -78606,15 +79949,15 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; - case 4: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -78630,7 +79973,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -78648,10 +79991,10 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -78661,10 +80004,10 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -78674,14 +80017,14 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -78689,10 +80032,10 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; - case 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; @@ -78712,15 +80055,33 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -78740,8 +80101,8 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand ); } - case 2: { - LogStep(2, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 4: { + LogStep(4, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -78749,14 +80110,14 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 3: { - LogStep(3, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 5: { + LogStep(5, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + case 6: { + LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -78764,28 +80125,28 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:0000000000I31506010", 22); return PairWithCode(kIdentityBeta, value); } - case 5: { - LogStep(5, "DUT_CE is commissioned by TH_CR2 on Fabric ID2"); + case 7: { + LogStep(7, "DUT_CE is commissioned by TH_CR2 on Fabric ID2"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 6: { - LogStep(6, "TH_CR1 reads the list of Fabrics on DUT_CE"); + case 8: { + LogStep(8, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH_CR2 reads the list of Fabrics on DUT_CE"); + case 9: { + LogStep(9, "TH_CR2 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } - case 8: { - LogStep(8, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 10: { + LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -78793,14 +80154,14 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 11: { + LogStep(11, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 12: { + LogStep(12, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -78808,14 +80169,14 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 13: { + LogStep(13, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); + case 14: { + LogStep(14, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -78835,21 +80196,21 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait for the commissioning window in step 13 to timeout"); + case 15: { + LogStep(15, "Wait for the commissioning window in step 13 to timeout"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH_CR2 reads the window status to verify the DUT_CE window is closed"); + case 16: { + LogStep(16, "TH_CR2 reads the window status to verify the DUT_CE window is closed"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); + case 17: { + LogStep(17, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -78869,8 +80230,8 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); + case 18: { + LogStep(18, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -78886,7 +80247,7 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand class Test_TC_CADMIN_1_4Suite : public TestCommand { public: - Test_TC_CADMIN_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_4", 17, credsIssuerConfig) + Test_TC_CADMIN_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_4", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -78926,11 +80287,19 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -78939,15 +80308,15 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; - case 4: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 5: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -78963,7 +80332,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -78979,10 +80348,10 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -78992,10 +80361,10 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -79005,14 +80374,14 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); } break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -79020,10 +80389,10 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; - case 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; @@ -79043,15 +80412,33 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -79062,8 +80449,8 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand ); } - case 2: { - LogStep(2, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 4: { + LogStep(4, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -79071,14 +80458,14 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 3: { - LogStep(3, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 5: { + LogStep(5, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH_CR2 starts a commissioning process with DUT_CE"); + case 6: { + LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79086,28 +80473,28 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 5: { - LogStep(5, "DUT_CE is commissioned by TH_CR2 on Fabric ID2 "); + case 7: { + LogStep(7, "DUT_CE is commissioned by TH_CR2 on Fabric ID2 "); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 6: { - LogStep(6, "TH_CR1 reads the list of Fabrics on DUT_CE"); + case 8: { + LogStep(8, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "TH_CR2 reads the list of Fabrics on DUT_CE"); + case 9: { + LogStep(9, "TH_CR2 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 10: { + LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -79115,14 +80502,14 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 11: { + LogStep(11, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 12: { + LogStep(12, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -79130,14 +80517,14 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + case 13: { + LogStep(13, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); + case 14: { + LogStep(14, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -79148,21 +80535,21 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait for the commissioning window in step 13 to timeout"); + case 15: { + LogStep(15, "Wait for the commissioning window in step 13 to timeout"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH_CR2 reads the window status to verify the DUT_CE window is closed"); + case 16: { + LogStep(16, "TH_CR2 reads the window status to verify the DUT_CE window is closed"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); + case 17: { + LogStep(17, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -79173,8 +80560,8 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); + case 18: { + LogStep(18, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79190,7 +80577,7 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand class Test_TC_CADMIN_1_5Suite : public TestCommand { public: - Test_TC_CADMIN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_5", 16, credsIssuerConfig) + Test_TC_CADMIN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_5", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -79234,32 +80621,40 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + 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)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -79267,23 +80662,23 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); } break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; @@ -79303,15 +80698,33 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); + case 3: { + LogStep(3, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -79331,15 +80744,15 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 2: { - LogStep(2, "Wait for PIXIT.CADMIN.CwDuration + 10 seconds"); + case 4: { + LogStep(4, "Wait for PIXIT.CADMIN.CwDuration + 10 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 190000UL; return WaitForMs(kIdentityAlpha, value); } - case 3: { - LogStep(3, "TH_CR2 starts a commissioning process with DUT_CE"); + case 5: { + LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79347,8 +80760,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 4: { - LogStep(4, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); + case 6: { + LogStep(6, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -79368,8 +80781,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH_CR1 revokes the commissioning window on DUT_CE"); + case 7: { + LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; @@ -79379,8 +80792,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); + case 8: { + LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79388,8 +80801,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 7: { - LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); + case 9: { + LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; @@ -79399,8 +80812,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + case 10: { + LogStep(10, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -79408,14 +80821,14 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + case 11: { + LogStep(11, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH_CR1 opens a new commissioning window on DUT_CE using wrong PakeVerifier value using ECM"); + case 12: { + LogStep(12, "TH_CR1 opens a new commissioning window on DUT_CE using wrong PakeVerifier value using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -79435,8 +80848,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); + case 13: { + LogStep(13, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -79457,8 +80870,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH_CR1 opens another commissioning window on DUT_CE using ECM"); + case 14: { + LogStep(14, "TH_CR1 opens another commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -79479,8 +80892,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE"); + case 15: { + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79488,8 +80901,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 14: { - LogStep(14, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); + case 16: { + LogStep(16, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; @@ -79499,8 +80912,8 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH_CR3 starts a commissioning process with DUT_CE"); + case 17: { + LogStep(17, "TH_CR3 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79516,7 +80929,7 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand class Test_TC_CADMIN_1_6Suite : public TestCommand { public: - Test_TC_CADMIN_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_6", 16, credsIssuerConfig) + Test_TC_CADMIN_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_6", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -79560,32 +80973,40 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + 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)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::CharSpan value; @@ -79593,24 +81014,24 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); } break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; @@ -79630,15 +81051,33 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -79649,15 +81088,15 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } - case 2: { - LogStep(2, "Wait for PIXIT.CADMIN.CwDuration + 10"); + case 4: { + LogStep(4, "Wait for PIXIT.CADMIN.CwDuration + 10"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 190000UL; return WaitForMs(kIdentityAlpha, value); } - case 3: { - LogStep(3, "Commission from beta"); + case 5: { + LogStep(5, "Commission from beta"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79665,8 +81104,8 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 4: { - LogStep(4, "TH_CR1 opens a commissioning window on DUT_CE"); + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -79677,8 +81116,8 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH_CR1 revokes the commissioning window on DUT_CE"); + case 7: { + LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; @@ -79688,16 +81127,16 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); + case 8: { + LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 7: { - LogStep(7, "TH_CR1 revokes the commissioning window on DUT_CE"); + case 9: { + LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; @@ -79707,8 +81146,8 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + case 10: { + LogStep(10, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::CharSpan value; @@ -79716,14 +81155,14 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + case 11: { + LogStep(11, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Basic::Id, Basic::Attributes::NodeLabel::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH_CR1 opens a commissioning window on DUT_CE"); + case 12: { + LogStep(12, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -79734,8 +81173,8 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH_CR1 opens another commissioning window on DUT_CE"); + case 13: { + LogStep(13, "TH_CR1 opens another commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -79746,24 +81185,24 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } - case 12: { - LogStep(12, "Commission from beta"); + case 14: { + LogStep(14, "Commission from beta"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 13: { - LogStep(13, "TH_CR2 starts a commissioning process on DUT_CE"); + case 15: { + LogStep(15, "TH_CR2 starts a commissioning process on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 14: { - LogStep(14, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); + case 16: { + LogStep(16, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; @@ -79773,8 +81212,8 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH_CR3 starts a commissioning process with DUT_CE"); + case 17: { + LogStep(17, "TH_CR3 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -79790,7 +81229,7 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand class Test_TC_CADMIN_1_9Suite : public TestCommand { public: - Test_TC_CADMIN_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_9", 29, credsIssuerConfig) + Test_TC_CADMIN_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_9", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -79838,6 +81277,7 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -79845,9 +81285,16 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -79855,23 +81302,15 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand tempFabricIndex = value; } break; - case 5: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -79953,6 +81392,14 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -79969,15 +81416,33 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, + case 3: { + LogStep(3, "Open commissioning window exactly like we plan to later to verify that `correctPayload` can in fact commision " "the device."); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -79999,8 +81464,8 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand ); } - case 2: { - LogStep(2, "Temporarily commission device with `correctPayload` just like we will try to later"); + case 4: { + LogStep(4, "Temporarily commission device with `correctPayload` just like we will try to later"); VerifyOrDo(!ShouldSkip("CADMIN.S && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -80009,22 +81474,22 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00I31506010", 22); return PairWithCode(kIdentityBeta, value); } - case 3: { - LogStep(3, "Wait for a CASE session"); + case 5: { + LogStep(5, "Wait for a CASE session"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 4: { - LogStep(4, "Read FabricIndex of beta so we can delete the temp fabric"); + case 6: { + LogStep(6, "Read FabricIndex of beta so we can delete the temp fabric"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Remove the temp fabric"); + case 7: { + LogStep(7, "Remove the temp fabric"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; @@ -80034,8 +81499,8 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH_CR1 opens a new commissioning window on DUT_CE"); + case 8: { + LogStep(8, "TH_CR1 opens a new commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -80055,26 +81520,6 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } case 9: { LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -80256,7 +81701,27 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 27: { - LogStep(27, "TH_CR2 starts a commissioning process with DUT_CE using valid setup code"); + LogStep(27, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 28: { + LogStep(28, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 29: { + LogStep(29, "TH_CR2 starts a commissioning process with DUT_CE using valid setup code"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -80265,8 +81730,8 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00I31506010", 22); return PairWithCode(kIdentityBeta, value); } - case 28: { - LogStep(28, "TH_CR3 starts a commissioning process with DUT_CE"); + case 30: { + LogStep(30, "TH_CR3 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -80284,7 +81749,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand { public: Test_TC_CADMIN_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_10", 28, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_10", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -80332,6 +81797,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -80339,9 +81805,16 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -80349,23 +81822,15 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand tempFabricIndex = value; } break; - case 5: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -80443,6 +81908,14 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -80459,15 +81932,33 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, + case 3: { + LogStep(3, "Open commissioning window exactly like we plan to later to verify that `correctPayload` can in fact commision " "the device."); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -80480,8 +81971,8 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand ); } - case 2: { - LogStep(2, "Temporarily commission device with `correctPayload` just like we will try to later"); + case 4: { + LogStep(4, "Temporarily commission device with `correctPayload` just like we will try to later"); VerifyOrDo(!ShouldSkip("CADMIN.S && CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -80490,22 +81981,22 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 3: { - LogStep(3, "Wait for a CASE session"); + case 5: { + LogStep(5, "Wait for a CASE session"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 4: { - LogStep(4, "Read FabricIndex of beta so we can delete the temp fabric"); + case 6: { + LogStep(6, "Read FabricIndex of beta so we can delete the temp fabric"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "Remove the temp fabric"); + case 7: { + LogStep(7, "Remove the temp fabric"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; @@ -80515,8 +82006,8 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); + case 8: { + LogStep(8, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -80527,26 +82018,6 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } case 9: { LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -80619,6 +82090,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 16: { LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -80638,7 +82110,6 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand } case 18: { LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; @@ -80727,7 +82198,27 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand return PairWithCode(kIdentityBeta, value); } case 27: { - LogStep(27, "TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding payload"); + LogStep(27, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 28: { + LogStep(28, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 29: { + LogStep(29, "TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding payload"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -80745,7 +82236,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand { public: Test_TC_CADMIN_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_13", 25, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_13", 27, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -80789,8 +82280,16 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -80798,7 +82297,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValue("windowStatus", value, 2U)); } break; - case 3: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -80806,7 +82305,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("value", value)); } break; - case 4: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -80814,32 +82313,32 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValueNonNull("value", value)); } break; - case 5: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 6: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 12: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -80859,14 +82358,14 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 13: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -80874,10 +82373,10 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValue("windowStatus", value, 1U)); } break; - case 16: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 17: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -80897,21 +82396,21 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 18: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; - case 21: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -80919,7 +82418,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; - case 23: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -80927,7 +82426,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); } break; - case 24: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -80951,15 +82450,33 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "TH_CR1 starts a commissioning process with DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Precondition: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 2: { + LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 1: { - LogStep(1, "TH_CR1 opens a commissioning window on DUT_CE"); + case 3: { + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -80970,42 +82487,42 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 2: { - LogStep(2, "TH_CR1 reads WindowStatus attribute from DUT_CE"); + case 4: { + LogStep(4, "TH_CR1 reads WindowStatus attribute from DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "TH_CR1 reads AdminFabricIndex attribute from DUT_CE"); + case 5: { + LogStep(5, "TH_CR1 reads AdminFabricIndex attribute from DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); } - case 4: { - LogStep(4, "TH_CR1 reads AdminVendorId attribute from DUT_CE"); + case 6: { + LogStep(6, "TH_CR1 reads AdminVendorId attribute from DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH_CR3 starts a commissioning process with DUT_CE"); + case 7: { + LogStep(7, "TH_CR3 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityGamma, value); } - case 6: { - LogStep(6, "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3"); + case 8: { + LogStep(8, "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; return WaitForCommissionee(kIdentityGamma, value); } - case 7: { - LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); + case 9: { + LogStep(9, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -81016,23 +82533,23 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE"); + case 10: { + LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 9: { - LogStep(9, "DUT_CE is commissioned to TH_CR2 on Fabric ID2 with Node ID2"); + case 11: { + LogStep(11, "DUT_CE is commissioned to TH_CR2 on Fabric ID2 with Node ID2"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 10: { - LogStep(10, "TH_CR1 opens a commissioning window on DUT_CE"); + case 12: { + LogStep(12, "TH_CR1 opens a commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -81043,8 +82560,8 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH_CR1 opens a 2nd commissioning window on DUT_CE"); + case 13: { + LogStep(13, "TH_CR1 opens a 2nd commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -81064,21 +82581,21 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH_CR1 reads the list of Fabrics on DUT_CE"); + case 14: { + LogStep(14, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } - case 13: { - LogStep(13, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + case 15: { + LogStep(15, "Wait for the expiration of PIXIT_COMM_WIN seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH_CR1 re-opens new commissioning window on DUT_CE using ECM"); + case 16: { + LogStep(16, "TH_CR1 re-opens new commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -81098,14 +82615,14 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH_CR1 reads WindowStatus attribute from DUT_CE"); + case 17: { + LogStep(17, "TH_CR1 reads WindowStatus attribute from DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "TH_CR3 opens a 2nd commissioning window on DUT_CE"); + case 18: { + LogStep(18, "TH_CR3 opens a 2nd commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -81125,21 +82642,21 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH_CR1 reads the list of Fabrics on DUT_CE"); + case 19: { + LogStep(19, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } - case 18: { - LogStep(18, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + case 20: { + LogStep(20, "Wait for the expiration of PIXIT_COMM_WIN seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "TH_CR1 opens a new commissioning window on DUT_CE"); + case 21: { + LogStep(21, "TH_CR1 opens a new commissioning window on DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -81159,8 +82676,8 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 20: { - LogStep(20, "TH_CR2 opens a 2nd commissioning window on DUT_CE using ECM"); + case 22: { + LogStep(22, "TH_CR2 opens a 2nd commissioning window on DUT_CE using ECM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; @@ -81180,27 +82697,27 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand ); } - case 21: { - LogStep(21, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + case 23: { + LogStep(23, "Wait for the expiration of PIXIT_COMM_WIN seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 180000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "TH_CR1 reads WindowStatus attribute from DUT_CE"); + case 24: { + LogStep(24, "TH_CR1 reads WindowStatus attribute from DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "TH_CR1 reads AdminFabricIndex attribute from DUT_CE"); + case 25: { + LogStep(25, "TH_CR1 reads AdminFabricIndex attribute from DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH_CR1 reads AdminVendorId attribute from DUT_CE"); + case 26: { + LogStep(26, "TH_CR1 reads AdminVendorId attribute from DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); @@ -81296,19 +82813,19 @@ class Test_TC_CADMIN_1_23Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Factory Reset the DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; return FactoryReset(kIdentityAlpha, value); } case 1: { - LogStep(1, "Factory Reset the DUT_CE"); + LogStep(1, "Precondition: Reset Devices to factory defaults"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); @@ -81455,19 +82972,19 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Factory Reset the DUT_CE"); + LogStep(0, "Precondition: Reset Devices to factory defaults"); VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; return FactoryReset(kIdentityAlpha, value); } case 1: { - LogStep(1, "Factory Reset the DUT_CE"); + LogStep(1, "Precondition: Reset Devices to factory defaults"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; value.message = - chip::Span("Please reboot the DUT and enter 'y' after DUT startsgarbage: not in length on purpose", 52); + chip::Span("Factory Reset the DUT and enter 'y' after successgarbage: not in length on purpose", 49); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); @@ -85977,16 +87494,12 @@ class Test_TC_CC_9_4Suite : public TestCommand class Test_TC_CC_3_1Suite : public TestCommand { public: - Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 19, credsIssuerConfig) + Test_TC_CC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_1", 51, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("hueShortestDistance", 0, UINT8_MAX, &mHueShortestDistance); - AddArgument("hueLongestDistance", 0, UINT8_MAX, &mHueLongestDistance); - AddArgument("hueDirectionUp", 0, UINT8_MAX, &mHueDirectionUp); - AddArgument("hueDirectionDown", 0, UINT8_MAX, &mHueDirectionDown); } ~Test_TC_CC_3_1Suite() {} @@ -85998,10 +87511,6 @@ class Test_TC_CC_3_1Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - chip::Optional mHueShortestDistance; - chip::Optional mHueLongestDistance; - chip::Optional mHueDirectionUp; - chip::Optional mHueDirectionDown; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -86024,24 +87533,13 @@ class Test_TC_CC_3_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)); - { - 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)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -86055,28 +87553,34 @@ class Test_TC_CC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValue("currentHue", value, mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 98U)); } break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValue("currentHue", value, mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, 120U)); + } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -86087,7 +87591,7 @@ class Test_TC_CC_3_1Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U)); + VerifyOrReturn(CheckValue("currentHue", value, 120U)); } break; case 14: @@ -86098,17 +87602,203 @@ class Test_TC_CC_3_1Suite : public TestCommand shouldContinue = true; break; case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("currentHue", value, mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 15U)); } break; - case 17: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 18: + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 166U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 224U)); + } + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 135U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 150U)); + } + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, 135U)); + } + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); + } + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); + } + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 105U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 120U)); + } + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, 120U)); + } + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 85U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); + } + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 68U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 92U)); + } + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 60U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 72U)); + } + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("currentHue", value, 60U)); + } + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -86139,7 +87829,16 @@ class Test_TC_CC_3_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.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -86147,34 +87846,293 @@ class Test_TC_CC_3_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 sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 60U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); + } + case 4: { + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 5: { + LogStep( + 5, + "TH sends MoveToHue command to DUT with Hue=120, Direction=0x00 (shortest distance) and TransitionTime=300 (30s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 120U; + value.direction = static_cast(0); + value.transitionTime = 300U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); + } + case 6: { + LogStep(6, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 7: { + LogStep(7, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 9: { + LogStep(9, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 10: { + LogStep(10, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 14: { + LogStep(14, + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (Shortest distance) and TransitionTime=0 " + "(immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 60U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); + } + case 15: { + LogStep(15, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep( + 16, + "TH sends MoveToHue command to DUT with Hue=135, Direction=0x01 (longest distance) and TransitionTime=300 (30s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 135U; + value.direction = static_cast(1); + value.transitionTime = 300U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); + } + case 17: { + LogStep(17, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 18: { + LogStep(18, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 19: { + LogStep(19, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 20: { + LogStep(20, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 21: { + LogStep(21, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 22: { + LogStep(22, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 23: { + LogStep(23, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 24: { + LogStep(24, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 25: { + LogStep(25, + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)."); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 60U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); + } + case 26: { + LogStep(26, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 27: { + LogStep(27, "TH sends MoveToHue command to DUT with Hue=120, Direction=0x02 (up) and TransitionTime=300 (30s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 120U; + value.direction = static_cast(2); + value.transitionTime = 300U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); + } + case 28: { + LogStep(28, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 29: { + LogStep(29, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 30: { + LogStep(30, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 31: { + LogStep(31, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 32: { + LogStep(32, "Wait 10s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 33: { + LogStep(33, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } - case 3: { - LogStep(3, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 34: { + LogStep(34, "Wait 5s"); 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::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); } - case 4: { - LogStep(4, "TH reads CurrentHue attribute from DUT"); + case 35: { + LogStep(35, "TH reads CurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends MoveToHue command to DUT another Hue with Direction Shortest distance and TransitionTime 300"); + case 36: { + LogStep(36, + "TH sends MoveToHue command to DUT with Hue=120, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = mHueShortestDistance.HasValue() ? mHueShortestDistance.Value() : 150U; + value.hue = 120U; value.direction = static_cast(0); - value.transitionTime = 300U; + value.transitionTime = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, @@ -86182,26 +88140,20 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "Wait 30s"); + case 37: { + LogStep(37, "Wait 100ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } - case 7: { - LogStep(7, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "TH sends MoveToHue command to DUT another Hue with Direction Longest distance and TransitionTime 300"); + case 38: { + LogStep(38, "TH sends MoveToHue command to DUT with Hue=60, Direction=0x03 (down) and TransitionTime=300 (30s)"); VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = mHueLongestDistance.HasValue() ? mHueLongestDistance.Value() : 200U; - value.direction = static_cast(1); + value.hue = 60U; + value.direction = static_cast(3); value.transitionTime = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -86210,77 +88162,72 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Wait 30s"); + case 39: { + LogStep(39, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "Over TransitionTime, TH reads CurrentHue attribute from DUT."); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 40: { + LogStep(40, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "TH sends MoveToHue command to DUT another Hue with Direction Up and TransitionTime 300"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = mHueDirectionUp.HasValue() ? mHueDirectionUp.Value() : 250U; - value.direction = static_cast(2); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 12: { - LogStep(12, "Wait 30s"); + case 41: { + LogStep(41, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 13: { - LogStep(13, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 42: { + LogStep(42, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "TH sends MoveToHue command to DUT another Hue with Direction Down and TransitionTime 300"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 43: { + LogStep(43, "Wait 10s"); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = mHueDirectionDown.HasValue() ? mHueDirectionDown.Value() : 170U; - value.direction = static_cast(3); - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Wait 30s"); + case 44: { + LogStep(44, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 45: { + LogStep(45, "Wait 5s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 30000UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "Over TransitionTime, TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 46: { + LogStep(46, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Turn off light that we turned on"); + case 47: { + LogStep(47, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 48: { + LogStep(48, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 49: { + LogStep(49, "Turn off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -86288,8 +88235,8 @@ class Test_TC_CC_3_1Suite : public TestCommand ); } - case 18: { - LogStep(18, "Check on/off attribute value is false after off command"); + case 50: { + LogStep(50, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -86301,17 +88248,12 @@ class Test_TC_CC_3_1Suite : public TestCommand class Test_TC_CC_7_1Suite : public TestCommand { public: - Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 36, credsIssuerConfig) + Test_TC_CC_7_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_7_1", 51, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); - AddArgument("EnhancedHueShortestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueShortestDistanceConfigValue); - AddArgument("EnhancedHueLongestDistanceConfigValue", 0, UINT16_MAX, &mEnhancedHueLongestDistanceConfigValue); - AddArgument("EnhancedHueDirectionUpConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionUpConfigValue); - AddArgument("EnhancedHueDirectionDownConfigValue", 0, UINT16_MAX, &mEnhancedHueDirectionDownConfigValue); } ~Test_TC_CC_7_1Suite() {} @@ -86323,11 +88265,6 @@ class Test_TC_CC_7_1Suite : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; chip::Optional mTimeout; - chip::Optional mEnhancedHueConfigValue; - chip::Optional mEnhancedHueShortestDistanceConfigValue; - chip::Optional mEnhancedHueLongestDistanceConfigValue; - chip::Optional mEnhancedHueDirectionUpConfigValue; - chip::Optional mEnhancedHueDirectionDownConfigValue; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -86350,129 +88287,104 @@ class Test_TC_CC_7_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)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedCurrentHue", value, - mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9000U)); } break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { 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, 9000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 11000U)); } break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue( - "enhancedCurrentHue", value, - mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12000U)); } break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 12000U)); } break; - case 16: + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 18700U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 25300U)); } break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue( - "enhancedCurrentHue", value, - mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 34700U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 41300U)); } break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; @@ -86482,9 +88394,8 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 50700U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 54000U)); } break; case 23: @@ -86496,27 +88407,15 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 54000U)); } break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn( - CheckValue("enhancedCurrentHue", value, - mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } + shouldContinue = true; break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -86530,9 +88429,8 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9000U)); } break; case 30: @@ -86544,9 +88442,8 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 9000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 11000U)); } break; case 32: @@ -86558,18 +88455,105 @@ class Test_TC_CC_7_1Suite : public TestCommand { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue( - "enhancedCurrentHue", value, - mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 11000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12000U)); } 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("enhancedCurrentHue", value, 12000U)); + } + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 9000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 11000U)); + } + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 7000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 9000U)); + } + break; + case 43: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 44: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 6000U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 7000U)); + } + break; + case 45: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 6000U)); + } + break; + case 47: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + } + break; + case 48: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + } + break; + case 49: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -86600,7 +88584,16 @@ class Test_TC_CC_7_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.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -86608,26 +88601,14 @@ class Test_TC_CC_7_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.F01 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 4: { - LogStep(4, "TH sends EnhancedMoveToHue command to DUT"); + LogStep(3, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1025U; + value.enhancedHue = 6000U; value.direction = static_cast(0); value.transitionTime = 0U; value.optionsMask = 0U; @@ -86637,19 +88618,21 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); + case 4: { + LogStep(4, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH sends EnhancedMoveToHue command to DUT"); + case 5: { + LogStep(5, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest distance) and " + "TransitionTime=300 (30s)."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = - mEnhancedHueShortestDistanceConfigValue.HasValue() ? mEnhancedHueShortestDistanceConfigValue.Value() : 1050U; + value.enhancedHue = 12000U; value.direction = static_cast(0); value.transitionTime = 300U; value.optionsMask = 0U; @@ -86659,52 +88642,90 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Wait 5500ms"); + case 6: { + LogStep(6, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 7: { + LogStep(7, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Wait 5500ms"); + case 8: { + LogStep(8, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 9: { + LogStep(9, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Wait 20s"); + case 10: { + LogStep(10, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 12: { - LogStep(12, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 11: { + LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } + case 12: { + LogStep(12, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } case 13: { - LogStep(13, "TH sends EnhancedMoveToHue command to DUT"); + LogStep(13, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 14: { + LogStep(14, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 6000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); + } + case 15: { + LogStep(15, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 16: { + LogStep(16, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=54000, Direction=0x01 (longest distance) and " + "TransitionTime=300 (30s)"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = - mEnhancedHueLongestDistanceConfigValue.HasValue() ? mEnhancedHueLongestDistanceConfigValue.Value() : 1200U; + value.enhancedHue = 54000U; value.direction = static_cast(1); value.transitionTime = 300U; value.optionsMask = 0U; @@ -86714,52 +88735,91 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 14: { - LogStep(14, "Wait 5500ms"); + case 17: { + LogStep(17, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 18: { + LogStep(18, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Wait 5500ms"); + case 19: { + LogStep(19, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 20: { + LogStep(20, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 18: { - LogStep(18, "Wait 20s"); + case 21: { + LogStep(21, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 19: { - LogStep(19, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 22: { + LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH sends EnhancedMoveToHue command to DUT"); + case 23: { + LogStep(23, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 24: { + LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 25: { + LogStep(25, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 6000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); + } + case 26: { + LogStep(26, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 27: { + LogStep(27, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x02 (up) and TransitionTime=300 " + "(30s)"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = mEnhancedHueDirectionUpConfigValue.HasValue() ? mEnhancedHueDirectionUpConfigValue.Value() : 1300U; - value.direction = static_cast(2); + value.enhancedHue = 12000U; + value.direction = static_cast(2); value.transitionTime = 300U; value.optionsMask = 0U; value.optionsOverride = 0U; @@ -86768,52 +88828,90 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 21: { - LogStep(21, "Wait 5500ms"); + case 28: { + LogStep(28, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 29: { + LogStep(29, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Wait 5500ms"); + case 30: { + LogStep(30, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 31: { + LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Wait 20s"); + case 32: { + LogStep(32, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 26: { - LogStep(26, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 33: { + LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "TH sends EnhancedMoveToHue command to DUT "); + case 34: { + LogStep(34, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 35: { + LogStep(35, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 36: { + LogStep(36, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; + value.enhancedHue = 12000U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::EnhancedMoveToHue::Id, + value, chip::NullOptional + + ); + } + case 37: { + LogStep(37, "Wait 100ms"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); + } + case 38: { + LogStep(38, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x03 (down) and TransitionTime=300 " + "(30s)."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; - value.enhancedHue = - mEnhancedHueDirectionDownConfigValue.HasValue() ? mEnhancedHueDirectionDownConfigValue.Value() : 1100U; + value.enhancedHue = 6000U; value.direction = static_cast(3); value.transitionTime = 300U; value.optionsMask = 0U; @@ -86823,47 +88921,72 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 28: { - LogStep(28, "Wait 5500ms"); + case 39: { + LogStep(39, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 40: { + LogStep(40, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Wait 5500ms"); + case 41: { + LogStep(41, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5500UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 31: { - LogStep(31, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 42: { + LogStep(42, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "Wait 20s"); + case 43: { + LogStep(43, "Wait 10s"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 20000UL; + value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 33: { - LogStep(33, "TH reads EnhancedCurrentHue attribute from DUT periodically"); + case 44: { + LogStep(44, "TH reads EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Turn off light that we turned on"); + case 45: { + LogStep(45, "Wait 5s"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 46: { + LogStep(46, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, + true, chip::NullOptional); + } + case 47: { + LogStep(47, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 48: { + LogStep(48, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); + } + case 49: { + LogStep(49, "Turn Off light that we turned on"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -86871,8 +88994,8 @@ class Test_TC_CC_7_1Suite : public TestCommand ); } - case 35: { - LogStep(35, "Check on/off attribute value is false after off command"); + case 50: { + LogStep(50, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -86884,7 +89007,7 @@ class Test_TC_CC_7_1Suite : public TestCommand class Test_TC_CC_9_1Suite : public TestCommand { public: - Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 73, credsIssuerConfig) + Test_TC_CC_9_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_1", 72, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -86932,11 +89055,6 @@ class Test_TC_CC_9_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)); @@ -86949,9 +89067,6 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -86959,10 +89074,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -86970,10 +89085,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -86981,10 +89096,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -86992,10 +89107,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87003,7 +89118,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87011,11 +89126,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 17: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87023,7 +89138,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep5d = value; } break; - case 19: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87033,11 +89148,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 20: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87047,10 +89162,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 22: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87058,7 +89173,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 24: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87066,7 +89181,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep6c = value; } break; - case 25: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87074,10 +89189,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep6c)); } break; - case 26: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87085,10 +89200,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 28: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 29: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87096,7 +89211,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 30: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87104,11 +89219,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 31: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 32: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87116,7 +89231,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep8d = value; } break; - case 33: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87126,11 +89241,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 34: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 35: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87140,10 +89255,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 36: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 37: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87151,7 +89266,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 38: + case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87159,7 +89274,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep9c = value; } break; - case 39: + case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87167,14 +89282,14 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep9c)); } break; - case 40: + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 41: + case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 42: + case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87182,10 +89297,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, 16384U)); } break; - case 43: + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 44: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87193,10 +89308,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 45: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 46: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87204,7 +89319,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 47: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87212,11 +89327,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 48: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 49: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87224,7 +89339,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep12d = value; } break; - case 50: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87234,11 +89349,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 51: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 52: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87248,10 +89363,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 53: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 54: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87259,7 +89374,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 55: + case 54: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87267,7 +89382,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep13c = value; } break; - case 56: + case 55: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87275,10 +89390,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep13c)); } break; - case 57: + case 56: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 58: + case 57: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87286,10 +89401,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 59: + case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 60: + case 59: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87297,7 +89412,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 61: + case 60: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87305,11 +89420,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 62: + case 61: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 63: + case 62: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87317,7 +89432,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStartEnhancedHueStep15d = value; } break; - case 64: + case 63: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87327,11 +89442,11 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 65: + case 64: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 66: + case 65: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87341,10 +89456,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 67: + case 66: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 68: + case 67: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -87352,7 +89467,7 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 69: + case 68: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87360,7 +89475,7 @@ class Test_TC_CC_9_1Suite : public TestCommand ColorLoopStoredEnhancedHueStep16b = value; } break; - case 70: + case 69: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -87368,10 +89483,10 @@ class Test_TC_CC_9_1Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueStep16b)); } break; - case 71: + case 70: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 72: + case 71: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -87402,7 +89517,16 @@ class Test_TC_CC_9_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Precondition : Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -87410,13 +89534,10 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 2: { - LogStep(2, "Precondition : Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); + LogStep(3, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; @@ -87438,16 +89559,9 @@ class Test_TC_CC_9_1Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " + "(De-activate) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87463,15 +89577,17 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "Read ColorLoopActive attribute from DUT"); + case 6: { + LogStep(6, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Sends ColorLoopSet Command - Set all Attributes"); + case 7: { + LogStep(7, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " + "to 0x0 (decrement hue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87487,15 +89603,17 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "Read ColorLoopDirection attribute from DUT"); + case 8: { + LogStep(8, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Sends ColorLoopSet Command - Set all Attributes"); + case 9: { + LogStep(9, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x4 (UpdateTime) and Time attribute to 30 (30s " + "for one loop) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87511,15 +89629,17 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 11: { - LogStep(11, "Read ColorLoopTime attribute from DUT"); + case 10: { + LogStep(10, "Read ColorLoopTime attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Sends ColorLoopSet Command - Set all Attributes"); + case 11: { + LogStep(11, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x8 (UpdateStartHue) and StartHue attribute to " + "0x00A0 to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87535,15 +89655,17 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 12: { + LogStep(12, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Sends ColorLoopSet Command - Set all Attributes"); + case 13: { + LogStep(13, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x1 " + "(start from ColorLoopStartEnhancedHue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87559,57 +89681,59 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 15: { - LogStep(15, "Read ColorLoopActive attribute from DUT"); + case 14: { + LogStep(14, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 15: { + LogStep(15, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait for 30S"); + case 16: { + LogStep(16, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 17: { + LogStep(17, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Read EnhancedCurrentHue attribute from DUT"); + case 18: { + LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Wait for 30S"); + case 19: { + LogStep(19, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 21: { - LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); + case 20: { + LogStep(20, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "Sends ColorLoopSet Command - Set all Attributes"); + case 21: { + LogStep(21, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " + "(De-activate) to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87625,29 +89749,31 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 23: { - LogStep(23, "Read ColorLoopActive attribute from DUT"); + case 22: { + LogStep(22, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 23: { + LogStep(23, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Read EnhancedCurrentHue attribute from DUT"); + case 24: { + LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Sends ColorLoopSet Command - Set all Attributes"); + case 25: { + LogStep(25, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " + "to 0x1 (increment hue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87663,15 +89789,17 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 27: { - LogStep(27, "Read ColorLoopDirection attribute from DUT"); + case 26: { + LogStep(26, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Sends ColorLoopSet Command - Set all Attributes"); + case 27: { + LogStep(27, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x1 " + "(start from ColorLoopStartEnhancedHue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87687,57 +89815,59 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 29: { - LogStep(29, "Read ColorLoopActive attribute from DUT"); + case 28: { + LogStep(28, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 29: { + LogStep(29, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 31: { - LogStep(31, "Wait for 30S"); + case 30: { + LogStep(30, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 32: { - LogStep(32, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 31: { + LogStep(31, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 33: { - LogStep(33, "Read EnhancedCurrentHue attribute from DUT"); + case 32: { + LogStep(32, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "Wait for 30S"); + case 33: { + LogStep(33, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 35: { - LogStep(35, "Read EnhancedCurrentHue attribute from DUT"); + case 34: { + LogStep(34, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "Sends ColorLoopSet Command - Set all Attributes"); + case 35: { + LogStep(35, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " + "(De-activate) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87753,29 +89883,31 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 37: { - LogStep(37, "Read ColorLoopActive attribute from DUT"); + case 36: { + LogStep(36, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 38: { - LogStep(38, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 37: { + LogStep(37, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "Read EnhancedCurrentHue attribute from DUT"); + case 38: { + LogStep(38, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 40: { - LogStep(40, "Enhanced Move To Hue command"); + case 39: { + LogStep(39, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; @@ -87789,22 +89921,24 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 41: { - LogStep(41, "Wait 1000ms"); + case 40: { + LogStep(40, "Wait 1000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs(kIdentityAlpha, value); } - case 42: { - LogStep(42, "Read EnhancedCurrentHue attribute from DUT"); + case 41: { + LogStep(41, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 43: { - LogStep(43, "Sends ColorLoopSet Command - Set all Attributes"); + case 42: { + LogStep(42, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " + "to 0x0 (decrement hue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87820,15 +89954,17 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 44: { - LogStep(44, "Read ColorLoopDirection attribute from DUT"); + case 43: { + LogStep(43, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 45: { - LogStep(45, "Sends ColorLoopSet Command - Set all Attributes"); + case 44: { + LogStep(44, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x2 " + "(start from EnhancedCurrentHue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87844,57 +89980,59 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 46: { - LogStep(46, "Read ColorLoopActive attribute from DUT"); + case 45: { + LogStep(45, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 47: { - LogStep(47, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 46: { + LogStep(46, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 48: { - LogStep(48, "Wait for 30S"); + case 47: { + LogStep(47, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 49: { - LogStep(49, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 48: { + LogStep(48, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 50: { - LogStep(50, "Read EnhancedCurrentHue attribute from DUT"); + case 49: { + LogStep(49, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 51: { - LogStep(51, "Wait for 30S"); + case 50: { + LogStep(50, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 52: { - LogStep(52, "Read EnhancedCurrentHue attribute from DUT"); + case 51: { + LogStep(51, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 53: { - LogStep(53, "Sends ColorLoopSet Command - Set all Attributes"); + case 52: { + LogStep(52, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " + "(De-activate) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87910,29 +90048,31 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 54: { - LogStep(54, "Read ColorLoopActive attribute from DUT"); + case 53: { + LogStep(53, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 55: { - LogStep(55, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 54: { + LogStep(54, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 56: { - LogStep(56, "Read EnhancedCurrentHue attribute from DUT"); + case 55: { + LogStep(55, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 57: { - LogStep(57, "Sends ColorLoopSet Command - Set all Attributes"); + case 56: { + LogStep(56, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " + "to 0x1 (increment hue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87948,15 +90088,17 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 58: { - LogStep(58, "Read ColorLoopDirection attribute from DUT"); + case 57: { + LogStep(57, "Read ColorLoopDirection attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 59: { - LogStep(59, "Sends ColorLoopSet Command - Set all Attributes"); + case 58: { + LogStep(58, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x2 " + "(start from EnhancedCurrentHue) to DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -87972,57 +90114,59 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 60: { - LogStep(60, "Read ColorLoopActive attribute from DUT"); + case 59: { + LogStep(59, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 61: { - LogStep(61, "Read ColorLoopStoredEnhancedHue attribute from DUT"); + case 60: { + LogStep(60, "Read ColorLoopStoredEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 62: { - LogStep(62, "Wait for 30S"); + case 61: { + LogStep(61, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 63: { - LogStep(63, "Read ColorLoopStartEnhancedHue attribute from DUT"); + case 62: { + LogStep(62, "Read ColorLoopStartEnhancedHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 64: { - LogStep(64, "Read EnhancedCurrentHue attribute from DUT"); + case 63: { + LogStep(63, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 65: { - LogStep(65, "Wait for 30S"); + case 64: { + LogStep(64, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 66: { - LogStep(66, "Read EnhancedCurrentHue attribute from DUT"); + case 65: { + LogStep(65, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 67: { - LogStep(67, "Sends ColorLoopSet Command - Set all Attributes"); + case 66: { + LogStep(66, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " + "(De-activate) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -88038,29 +90182,29 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 68: { - LogStep(68, "Read ColorLoopActive attribute from DUT"); + case 67: { + LogStep(67, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 69: { - LogStep(69, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 68: { + LogStep(68, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 70: { - LogStep(70, "Read EnhancedCurrentHue attribute from DUT"); + case 69: { + LogStep(69, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F02 && CC.S.F01 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 71: { - LogStep(71, "Turn Off light for color control tests"); + case 70: { + LogStep(70, "Turn Off light for color control tests"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -88068,8 +90212,8 @@ class Test_TC_CC_9_1Suite : public TestCommand ); } - case 72: { - LogStep(72, "Check on/off attribute value is false after off command"); + case 71: { + LogStep(71, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -88081,7 +90225,7 @@ class Test_TC_CC_9_1Suite : public TestCommand class Test_TC_CC_9_2Suite : public TestCommand { public: - Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 32, credsIssuerConfig) + Test_TC_CC_9_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_2", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -88124,11 +90268,6 @@ class Test_TC_CC_9_2Suite : 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)); @@ -88141,9 +90280,6 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88151,7 +90287,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88159,7 +90295,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88167,7 +90303,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88175,10 +90311,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88186,7 +90322,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88194,11 +90330,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88206,7 +90342,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88216,11 +90352,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 17: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88230,10 +90366,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88241,11 +90377,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 1U)); } break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88253,7 +90389,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStartEnhancedHue = value; } break; - case 23: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88263,11 +90399,11 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 24: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 25: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88277,10 +90413,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 26: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 27: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88288,7 +90424,7 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 28: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88296,7 +90432,7 @@ class Test_TC_CC_9_2Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 29: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88304,10 +90440,10 @@ class Test_TC_CC_9_2Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 30: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -88338,7 +90474,16 @@ class Test_TC_CC_9_2Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Precondition: Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -88346,13 +90491,10 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 2: { - LogStep(2, "Precondition: Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); + LogStep(3, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; @@ -88374,16 +90516,9 @@ class Test_TC_CC_9_2Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0xF, Action attribute to 0x0 (De-activate), " + "Direction attribute to 0x0 (decrement hue), Time attribute to 30, and StartHue attribute to 0x00A0 to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -88399,36 +90534,38 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 7: { - LogStep(7, "Read ColorLoopActive attribute from DUT"); + case 6: { + LogStep(6, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopDirection attribute from DUT."); + case 7: { + LogStep(7, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read ColorLoopTime attribute from DUT."); + case 8: { + LogStep(8, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 9: { + LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Color Loop Set Command - Set all Attributes"); + case 10: { + LogStep(10, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x1 " + "(start from ColorLoopStartEnhancedHue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -88444,57 +90581,59 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "Read ColorLoopActive attribute from DUT."); + case 11: { + LogStep(11, "Read ColorLoopActive attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 12: { + LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait for 30S"); + case 13: { + LogStep(13, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 14: { + LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); + case 15: { + LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait for 30S"); + case 16: { + LogStep(16, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); + case 17: { + LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Color Loop Set Command - Start Color Loop"); + case 18: { + LogStep(18, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x2 (UpdateDirection) and Direction attribute " + "to 0x1 (increment hue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -88510,50 +90649,52 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 20: { - LogStep(20, "Read ColorLoopDirection attribute from DUT."); + case 19: { + LogStep(19, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait for 30S"); + case 20: { + LogStep(20, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 21: { + LogStep(21, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); + case 22: { + LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "Wait for 30S"); + case 23: { + LogStep(23, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 25: { - LogStep(25, "Read EnhancedCurrentHue attribute from DUT"); + case 24: { + LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 26: { - LogStep(26, "Color Loop Set Command - Start Color Loop"); + case 25: { + LogStep(25, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " + "(De-activate) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -88569,29 +90710,29 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 27: { - LogStep(27, "Read ColorLoopActive attribute from DUT"); + case 26: { + LogStep(26, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 27: { + LogStep(27, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Read EnhancedCurrentHue attribute from DUT."); + case 28: { + LogStep(28, "Read EnhancedCurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "Turn off light for color control tests"); + case 29: { + LogStep(29, "Turn off light for color control tests"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -88599,8 +90740,8 @@ class Test_TC_CC_9_2Suite : public TestCommand ); } - case 31: { - LogStep(31, "Check on/off attribute value is false after off command"); + case 30: { + LogStep(30, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } @@ -88612,7 +90753,7 @@ class Test_TC_CC_9_2Suite : public TestCommand class Test_TC_CC_9_3Suite : public TestCommand { public: - Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 31, credsIssuerConfig) + Test_TC_CC_9_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_9_3", 30, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -88654,11 +90795,6 @@ class Test_TC_CC_9_3Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 1)); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -88671,9 +90807,6 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88681,7 +90814,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 8: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88689,7 +90822,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopDirection", value, 0U)); } break; - case 9: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88697,7 +90830,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 30U)); } break; - case 10: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88705,10 +90838,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStartEnhancedHue", value, 160U)); } break; - case 11: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88716,7 +90849,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 1U)); } break; - case 13: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88724,11 +90857,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopStoredEnhancedHue", value, 16384U)); } break; - case 14: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 15: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88736,7 +90869,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStartEnhancedHueValue = value; } break; - case 16: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88746,11 +90879,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 17: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88760,10 +90893,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 19: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88771,11 +90904,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopTime", value, 60U)); } break; - case 21: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88785,11 +90918,11 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 23: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 24: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88799,10 +90932,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 25: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -88810,7 +90943,7 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("colorLoopActive", value, 0U)); } break; - case 27: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88818,7 +90951,7 @@ class Test_TC_CC_9_3Suite : public TestCommand ColorLoopStoredEnhancedHueValue = value; } break; - case 28: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; @@ -88826,10 +90959,10 @@ class Test_TC_CC_9_3Suite : public TestCommand VerifyOrReturn(CheckValue("enhancedCurrentHue", value, ColorLoopStoredEnhancedHueValue)); } break; - case 29: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -88860,7 +90993,16 @@ class Test_TC_CC_9_3Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Precondition: Turn on light for color control tests"); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "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; @@ -88868,13 +91010,10 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 2: { - LogStep(2, "Precondition: Check on/off attribute value is true after on command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } case 3: { - LogStep(3, "Precondition : Set DUT EnhancedCurrentHue to 0x4000 using EnhancedMoveToHue command"); + LogStep(3, + "TH sends EnhancedMoveToHue command to DUT with EnhancedHue=0x4000, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type value; @@ -88896,16 +91035,9 @@ class Test_TC_CC_9_3Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.A000f && CC.S.F02 && CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 6: { - LogStep(6, "Sends ColorLoopSet Command - Set all Attributes"); + LogStep(5, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0xF, Action attribute to 0x0 (De-activate), " + "Direction attribute to 0x0 (decrement hue), Time attribute to 30, and StartHue attribute to 0x00A0 to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -88921,36 +91053,38 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 7: { - LogStep(7, "Read ColorLoopActive attribute from DUT"); + case 6: { + LogStep(6, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "Read ColorLoopDirection attribute from DUT."); + case 7: { + LogStep(7, "Read ColorLoopDirection attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4003 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Read ColorLoopTime attribute from DUT."); + case 8: { + LogStep(8, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 9: { + LogStep(9, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 11: { - LogStep(11, "Color Loop Set Command - Set all Attributes"); + case 10: { + LogStep(10, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x1 " + "(start from ColorLoopStartEnhancedHue) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -88966,57 +91100,57 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 12: { - LogStep(12, "Read ColorLoopActive attribute from DUT."); + case 11: { + LogStep(11, "Read ColorLoopActive attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 12: { + LogStep(12, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "Wait for 30S"); + case 13: { + LogStep(13, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 15: { - LogStep(15, "Read ColorLoopStartEnhancedHue attribute from DUT."); + case 14: { + LogStep(14, "Read ColorLoopStartEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4005 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } - case 16: { - LogStep(16, "Read EnhancedCurrentHue attribute from DUT"); + case 15: { + LogStep(15, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait for 30S"); + case 16: { + LogStep(16, "Wait for 30S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 30000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "Read EnhancedCurrentHue attribute from DUT"); + case 17: { + LogStep(17, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Color Loop Set Command - Start Color Loop"); + case 18: { + LogStep(18, "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x4 and Time attribute to 60 to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -89032,43 +91166,45 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 20: { - LogStep(20, "Read ColorLoopTime attribute from DUT."); + case 19: { + LogStep(19, "Read ColorLoopTime attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4004 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "Wait for 60S"); + case 20: { + LogStep(20, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Read EnhancedCurrentHue attribute from DUT"); + case 21: { + LogStep(21, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 23: { - LogStep(23, "Wait for 60S"); + case 22: { + LogStep(22, "Wait for 60S"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 60000UL; return WaitForMs(kIdentityAlpha, value); } - case 24: { - LogStep(24, "Read EnhancedCurrentHue attribute from DUT"); + case 23: { + LogStep(23, "Read EnhancedCurrentHue attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Color Loop Set Command - Start Color Loop"); + case 24: { + LogStep(24, + "TH sends ColorLoopSet command to with UpdateFlag attribute to 0x1 (UpdateAction) and Action attribute to 0x0 " + "(De-activate) to DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type value; @@ -89084,29 +91220,29 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 26: { - LogStep(26, "Read ColorLoopActive attribute from DUT"); + case 25: { + LogStep(25, "Read ColorLoopActive attribute from DUT"); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4002 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "Read ColorLoopStoredEnhancedHue attribute from DUT."); + case 26: { + LogStep(26, "Read ColorLoopStoredEnhancedHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4006 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } - case 28: { - LogStep(28, "Read EnhancedCurrentHue attribute from DUT."); + case 27: { + LogStep(27, "Read EnhancedCurrentHue attribute from DUT."); VerifyOrDo(!ShouldSkip("CC.S.F01 && CC.S.F02 && CC.S.A4000 && CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } - case 29: { - LogStep(29, "Turn off light for color control tests"); + case 28: { + LogStep(28, "Turn off light for color control tests"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -89114,8 +91250,8 @@ class Test_TC_CC_9_3Suite : public TestCommand ); } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); + case 29: { + LogStep(29, "Check on/off attribute value is false after off command"); VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index e0b62d2ab70914..a7380dc55ff4f5 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -2151,16 +2151,6 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -2190,9 +2180,6 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -2206,7 +2193,7 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -2346,15 +2333,6 @@ class Test_TC_BOOL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_BOOL_2_1 : public TestCommandBridge { @@ -2542,16 +2520,6 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -2584,9 +2552,6 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -2600,7 +2565,7 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -2744,15 +2709,6 @@ class Test_TC_ACT_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_CC_1_1 : public TestCommandBridge { @@ -2814,22 +2770,317 @@ class Test_TC_CC_1_1 : public TestCommandBridge { err = TestReadTheGlobalAttributeAttributeList_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the optional attribute(CurrentHue) in AttributeList\n"); + if (ShouldSkip("CC.S.A0000")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentHueInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional attribute(CurrentSaturation) in AttributeList\n"); + if (ShouldSkip("CC.S.A0001")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentSaturationInAttributeList_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Read the optional attribute(RemainingTime) in AttributeList\n"); + if (ShouldSkip("CC.S.A0002")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeRemainingTimeInAttributeList_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read the optional attribute(CurrentX) in AttributeList\n"); + if (ShouldSkip("CC.S.A0003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentXInAttributeList_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the optional attribute(CurrentY) in AttributeList\n"); + if (ShouldSkip("CC.S.A0004")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCurrentYInAttributeList_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Read the optional attribute(DriftCompensation) in AttributeList\n"); + if (ShouldSkip("CC.S.A0005")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeDriftCompensationInAttributeList_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the optional attribute(CompensationText) in AttributeList\n"); + if (ShouldSkip("CC.S.A0006")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCompensationTextInAttributeList_10(); + break; + case 11: + ChipLogProgress( + chipTool, " ***** Test Step 11 : Read the optional attribute(ColorTemperatureMireds) in AttributeList\n"); + if (ShouldSkip("CC.S.A0007")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read the optional attribute(EnhancedCurrentHue) in AttributeList\n"); + if (ShouldSkip("CC.S.A4000")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Read the optional attribute(ColorLoopActive) in AttributeList\n"); + if (ShouldSkip("CC.S.A4002")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorLoopActiveInAttributeList_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Read the optional attribute(ColorLoopDirection) in AttributeList\n"); + if (ShouldSkip("CC.S.A4003")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorLoopDirectionInAttributeList_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read the optional attribute(ColorLoopTime) in AttributeList\n"); + if (ShouldSkip("CC.S.A4004")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorLoopTimeInAttributeList_15(); + break; + case 16: + ChipLogProgress( + chipTool, " ***** Test Step 16 : Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList\n"); + if (ShouldSkip("CC.S.A4005")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_16(); + break; + case 17: + ChipLogProgress( + chipTool, " ***** Test Step 17 : Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList\n"); + if (ShouldSkip("CC.S.A4006")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_17(); + break; + case 18: + ChipLogProgress( + chipTool, " ***** Test Step 18 : Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList\n"); + if (ShouldSkip("CC.S.A400b")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_18(); + break; + case 19: + ChipLogProgress( + chipTool, " ***** Test Step 19 : Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList\n"); + if (ShouldSkip("CC.S.A400c")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_19(); + break; + case 20: + ChipLogProgress( + chipTool, " ***** Test Step 20 : Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList\n"); + if (ShouldSkip("CC.S.A400d")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_20(); + break; + case 21: + ChipLogProgress( + chipTool, " ***** Test Step 21 : Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList\n"); + if (ShouldSkip("CC.S.A4010")) { + NextTest(); + return; + } + err = TestReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Read the optional command(MoveToHue) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Read the optional command(MoveHue) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C01.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveHueInAcceptedCommandList_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read the optional command(StepHue) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C02.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandStepHueInAcceptedCommandList_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Read the optional command(MoveToSaturation) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : Read the optional command(MoveSaturation) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C04.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveSaturationInAcceptedCommandList_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Read the optional command(StepSaturation) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandStepSaturationInAcceptedCommandList_27(); + break; + case 28: + ChipLogProgress( + chipTool, " ***** Test Step 28 : Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C06.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Read the optional command(MoveToColor) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveToColorInAcceptedCommandList_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Read the optional command(MoveColor) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveColorInAcceptedCommandList_30(); + break; + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : Read the optional command(StepColor) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C09.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandStepColorInAcceptedCommandList_31(); + break; + case 32: + ChipLogProgress( + chipTool, " ***** Test Step 32 : Read the optional command(MoveToColorTemperature) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C0a.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_32(); + break; + case 33: + ChipLogProgress( + chipTool, " ***** Test Step 33 : Read the optional command(EnhancedMoveToHue) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C40.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Read the optional command(EnhancedMoveHue) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_34(); + break; + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : Read the optional command(EnhancedStepHue) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C42.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_35(); + break; + case 36: ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + " ***** Test Step 36 : Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C43.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Read the optional command(ColorLoopSet) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C44.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandColorLoopSetInAcceptedCommandList_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : Read the optional command(StopMoveStep) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C47.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandStopMoveStepInAcceptedCommandList_38(); + break; + case 39: + ChipLogProgress( + chipTool, " ***** Test Step 39 : Read the optional command(MoveColorTemperature) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C4b.Rsp")) { + NextTest(); + return; + } + err = TestReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_39(); + break; + case 40: + ChipLogProgress( + chipTool, " ***** Test Step 40 : Read the optional command(StepColorTemperature) in AcceptedCommandList\n"); + if (ShouldSkip("CC.S.C4c.Rsp")) { NextTest(); return; } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); + err = TestReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_41(); break; } @@ -2863,6 +3114,111 @@ class Test_TC_CC_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 34: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 35: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -2876,7 +3232,7 @@ class Test_TC_CC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 42; chip::Optional mNodeId; chip::Optional mCluster; @@ -2968,7 +3324,403 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() + CHIP_ERROR TestReadTheOptionalAttributeCurrentHueInAttributeList_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentHue) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeCurrentSaturationInAttributeList_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentSaturation) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeRemainingTimeInAttributeList_6() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(RemainingTime) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeCurrentXInAttributeList_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentX) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeCurrentYInAttributeList_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CurrentY) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeDriftCompensationInAttributeList_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(DriftCompensation) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeCompensationTextInAttributeList_10() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CompensationText) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorTemperatureMiredsInAttributeList_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorTemperatureMireds) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeEnhancedCurrentHueInAttributeList_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(EnhancedCurrentHue) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16384UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorLoopActiveInAttributeList_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorLoopActive) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16386UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorLoopDirectionInAttributeList_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorLoopDirection) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16387UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorLoopTimeInAttributeList_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorLoopTime) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16388UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorLoopStartEnhancedHueInAttributeList_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16389UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorLoopStoredEnhancedHueInAttributeList_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16390UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMinMiredsInAttributeList_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16395UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeColorTempPhysicalMaxMiredsInAttributeList_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16396UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeCoupleColorTempToLevelMinMiredsInAttributeList_20() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16397UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalAttributeStartUpColorTemperatureMiredsInAttributeList_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 16400UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveToHueInAcceptedCommandList_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -2977,18 +3729,416 @@ class Test_TC_CC_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); + NSLog(@"Read the optional command(MoveToHue) in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + CHIP_ERROR TestReadTheOptionalCommandMoveHueInAcceptedCommandList_23() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveHue) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandStepHueInAcceptedCommandList_24() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(StepHue) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveToSaturationInAcceptedCommandList_25() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveToSaturation) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveSaturationInAcceptedCommandList_26() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveSaturation) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 4UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandStepSaturationInAcceptedCommandList_27() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(StepSaturation) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveToHueAndSaturationInAcceptedCommandList_28() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 6UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveToColorInAcceptedCommandList_29() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveToColor) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveColorInAcceptedCommandList_30() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveColor) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandStepColorInAcceptedCommandList_31() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(StepColor) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 9UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveToColorTemperatureInAcceptedCommandList_32() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveToColorTemperature) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 10UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueInAcceptedCommandList_33() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(EnhancedMoveToHue) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 64UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveHueInAcceptedCommandList_34() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(EnhancedMoveHue) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 65UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandEnhancedStepHueInAcceptedCommandList_35() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(EnhancedStepHue) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 66UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandEnhancedMoveToHueAndSaturationInAcceptedCommandList_36() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 67UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandColorLoopSetInAcceptedCommandList_37() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(ColorLoopSet) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 68UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandStopMoveStepInAcceptedCommandList_38() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(StopMoveStep) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 71UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandMoveColorTemperatureInAcceptedCommandList_39() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(MoveColorTemperature) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 75UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheOptionalCommandStepColorTemperatureInAcceptedCommandList_40() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional command(StepColorTemperature) in AcceptedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 76UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -3012,15 +4162,6 @@ class Test_TC_CC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_CC_2_1 : public TestCommandBridge { @@ -4740,7 +5881,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -4774,188 +5914,196 @@ class Test_TC_CC_3_2 : 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.F00 && 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.F00 && 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 reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentHueAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveHue command to DUT with MoveMode Up\n"); + 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.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeUp_5(); + err = TestThSendsMoveHueCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 3000ms\n"); - err = TestWait3000ms_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 several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_7(); + err = TestThReadsCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 2000\n"); - err = TestWait2000_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_9(); + err = TestThReadsCurrentHueAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 3000\n"); - err = TestWait3000_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 10s\n"); + err = TestWait10s_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 11 : TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_11(); + err = TestThSendsMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends MoveHue command to DUT with MoveMode Stop\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeStop_12(); + err = TestThReadsCurrentHueAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); - err = TestWait1000ms_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 2s\n"); + err = TestWait2s_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_14(); + err = TestThReadsCurrentHueAttributeFromDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); - err = TestWait1000ms_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_16(); + err = TestThSendsMoveToHueCommandToDutWithHue60Direction0x00ShortestDistanceAndTransitionTime0Immediately_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); + err = TestWait100ms_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends MoveHue command to DUT with MoveMode Down\n"); + ChipLogProgress( + chipTool, " ***** Test Step 17 : TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)\n"); if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeDown_17(); + err = TestThSendsMoveHueCommandToDutWithMoveMode0x03DownAndRate5UnitsS_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); - err = TestWait1000ms_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); + err = TestWait10s_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_19(); + err = TestThReadsCurrentHueAttributeFromDut_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); - err = TestWait1000ms_20(); + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); + err = TestWait10s_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_21(); + err = TestThReadsCurrentHueAttributeFromDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 1000ms\n"); - err = TestWait1000ms_22(); + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 10s\n"); + err = TestWait10s_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress( + chipTool, " ***** Test Step 23 : TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_23(); + err = TestThSendsMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends MoveHue command to DUT with MoveMode Stop\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThSendsMoveHueCommandToDutWithMoveModeStop_24(); + err = TestThReadsCurrentHueAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); - err = TestWait1000ms_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 2s\n"); + err = TestWait2s_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_26(); + err = TestThReadsCurrentHueAttributeFromDut_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); - err = TestWait1000ms_27(); + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads CurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { NextTest(); return; } - err = TestThReadsCurrentHueAttributeFromDutSeveralTimes_28(); + err = TestThReadsEnhancedColorModeAttributeFromDut_28(); break; case 29: ChipLogProgress(chipTool, " ***** Test Step 29 : Turn off light that we turned on\n"); @@ -5095,7 +6243,6 @@ class Test_TC_CC_3_2 : public TestCommandBridge { chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -5105,46 +6252,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() - { - 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() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5166,30 +6274,24 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() + 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 readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue 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)); - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeUp_5() + CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue200Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5197,32 +6299,34 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + __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 moveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveHue command to DUT with MoveMode Up Error: %@", err); + [cluster moveToHueWithParams:params + completionHandler:^(NSError * _Nullable 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait3000ms_6() + CHIP_ERROR TestWait100ms_4() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_7() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5230,29 +6334,31 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times 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("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait2000_8() + CHIP_ERROR TestWait10s_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_9() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5261,13 +6367,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 245U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 255U)); NextTest(); }]; @@ -5275,14 +6380,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait3000_10() + CHIP_ERROR TestWait10s_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 3000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_11() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5291,13 +6396,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", 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)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 35U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 55U)); NextTest(); }]; @@ -5305,7 +6409,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_12() + CHIP_ERROR TestWait10s_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5315,13 +6426,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + 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 Stop Error: %@", err); + NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5330,16 +6440,9 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentHueValueStep2f; - CHIP_ERROR TestWait1000ms_13() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull CurrentHueValue; - - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_14() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5348,15 +6451,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", 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)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 80U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 110U)); { - CurrentHueValue = value; + CurrentHueValueStep2f = value; } NextTest(); @@ -5365,14 +6467,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_15() + CHIP_ERROR TestWait2s_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_16() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5381,13 +6483,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", 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(CheckValue("CurrentHue", actualValue, CurrentHueValueStep2f)); } NextTest(); @@ -5396,7 +6498,7 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeDown_17() + CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue60Direction0x00ShortestDistanceAndTransitionTime0Immediately_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5404,32 +6506,34 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; + params.hue = [NSNumber numberWithUnsignedChar:60U]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; 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 Down Error: %@", err); + [cluster moveToHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHue command to DUT with Hue=60, 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 TestWait1000ms_18() + CHIP_ERROR TestWait100ms_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_19() + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x03DownAndRate5UnitsS_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5437,29 +6541,31 @@ class Test_TC_CC_3_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + 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=0x03 (down) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_20() + CHIP_ERROR TestWait10s_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_21() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5468,13 +6574,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", 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)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 20U)); NextTest(); }]; @@ -5482,14 +6587,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_22() + CHIP_ERROR TestWait10s_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_23() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5498,13 +6603,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", 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)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 180U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 240U)); NextTest(); }]; @@ -5512,7 +6616,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveModeStop_24() + CHIP_ERROR TestWait10s_22() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5522,13 +6633,12 @@ class Test_TC_CC_3_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + 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 Stop Error: %@", err); + NSLog(@"TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5537,16 +6647,9 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentHueValueStep3f; - CHIP_ERROR TestWait1000ms_25() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull CurrentHueValueAfterStopmode; - - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_26() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5555,15 +6658,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", 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)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 140U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 180U)); { - CurrentHueValueAfterStopmode = value; + CurrentHueValueStep3f = value; } NextTest(); @@ -5572,14 +6674,14 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_27() + CHIP_ERROR TestWait2s_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDutSeveralTimes_28() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5588,13 +6690,13 @@ class Test_TC_CC_3_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT several times Error: %@", 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, CurrentHueValueAfterStopmode)); + VerifyOrReturn(CheckValue("CurrentHue", actualValue, CurrentHueValueStep3f)); } NextTest(); @@ -5603,6 +6705,50 @@ class Test_TC_CC_3_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestThReadsColorModeAttributeFromDut_27() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_28() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -5653,7 +6799,6 @@ class Test_TC_CC_3_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -5687,92 +6832,172 @@ class Test_TC_CC_3_3 : 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.F00 && 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.F00 && 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 reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentHueAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepHue command to DUT with StepMode Up\n"); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 " + "(20s)\n"); if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestThSendsStepHueCommandToDutWithStepModeUp_5(); + err = TestThSendsStepHueCommandToDutWithStepMode0x01UpStepSize60AndTransitionTime20020s_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7(); + err = TestThReadsCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepHue command to DUT with StepMode Down\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5s\n"); + err = TestWait5s_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and " + "TransitionTime=0 (immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveToHueCommandToDutWithHue50Direction0x00ShortestDistanceAndTransitionTime0Immediately_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); + err = TestWait100ms_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH sends StepHue command to DUT with StepMode=0x03 (down), StepSize=60 and " + "TransitionTime=200 (20s)\n"); if (ShouldSkip("CC.S.F00 && CC.S.C02.Rsp")) { NextTest(); return; } - err = TestThSendsStepHueCommandToDutWithStepModeDown_8(); + err = TestThSendsStepHueCommandToDutWithStepMode0x03DownStepSize60AndTransitionTime20020s_14(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 10s\n"); + err = TestWait10s_15(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0000 && CC.S.C02.Rsp")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10(); + err = TestThReadsCurrentHueAttributeFromDut_16(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 10s\n"); + err = TestWait10s_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 5s\n"); + err = TestWait5s_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_11(); + err = TestTurnOffLightThatWeTurnedOn_23(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_24(); break; } @@ -5824,6 +7049,42 @@ class Test_TC_CC_3_3 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -5837,12 +7098,11 @@ class Test_TC_CC_3_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 25; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -5852,14 +7112,36 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() { 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); + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5869,21 +7151,92 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue200Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + __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 moveToHueWithParams:params + completionHandler:^(NSError * _Nullable 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)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepMode0x01UpStepSize60AndTransitionTime20020s_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:60U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:200U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + stepHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 (20s) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + 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)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 215U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 245U)); NextTest(); }]; @@ -5891,7 +7244,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestWait10s_8() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5899,21 +7259,28 @@ class Test_TC_CC_3_3 : public TestCommandBridge { 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); + [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(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 10U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_4() + CHIP_ERROR TestWait5s_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5926,9 +7293,10 @@ class Test_TC_CC_3_3 : public TestCommandBridge { 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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, 5U)); + } NextTest(); }]; @@ -5936,7 +7304,42 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeUp_5() + CHIP_ERROR TestThSendsMoveToHueCommandToDutWithHue50Direction0x00ShortestDistanceAndTransitionTime0Immediately_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; + params.hue = [NSNumber numberWithUnsignedChar:50U]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and " + @"TransitionTime=0 (immediately) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_13() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsStepHueCommandToDutWithStepMode0x03DownStepSize60AndTransitionTime20020s_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5945,15 +7348,16 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:5U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = [NSNumber numberWithUnsignedChar:60U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:200U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepHueWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepHue command to DUT with StepMode Up Error: %@", err); + NSLog(@"TH sends StepHue command to DUT with StepMode=0x03 (down), StepSize=60 and TransitionTime=200 (20s) " + @"Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -5963,14 +7367,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait10s_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_7() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -5979,13 +7383,12 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 5U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 17U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 23U)); NextTest(); }]; @@ -5993,7 +7396,14 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepHueCommandToDutWithStepModeDown_8() + CHIP_ERROR TestWait10s_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6001,33 +7411,28 @@ class Test_TC_CC_3_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:5U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:5U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepHue command to DUT with StepMode Down Error: %@", err); + [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 245U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 255U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait5s_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6036,13 +7441,58 @@ class Test_TC_CC_3_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 249U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentHue", actualValue, 245U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_22() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -6050,7 +7500,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6067,7 +7517,7 @@ class Test_TC_CC_3_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6134,72 +7584,123 @@ class Test_TC_CC_4_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.F00 && 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.F00 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 " + "(immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToSaturationCommandToDutWithSaturation60AndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsCurrentSaturationAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveToSaturation command to DUT\n"); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=300 (30s)\n"); if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToSaturationCommandToDut_5(); + err = TestThSendsMoveToSaturationCommandToDutWithSaturation120AndTransitionTime30030s_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); - err = TestWait1500ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C03.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7(); + err = TestThReadsCurrentSaturationAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 10s\n"); + err = TestWait10s_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5s\n"); + err = TestWait5s_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_8(); + err = TestTurnOffLightThatWeTurnedOn_16(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17(); break; } @@ -6242,6 +7743,30 @@ class Test_TC_CC_4_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -6255,7 +7780,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -6270,14 +7795,36 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() { 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); + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -6287,29 +7834,76 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation60AndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = [NSNumber numberWithUnsignedChar:60U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 " + @"(immediately) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + NextTest(); + }]; - NextTest(); - }]; + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation120AndTransitionTime30030s_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = [NSNumber numberWithUnsignedChar:120U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=300 (30s) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestWait10s_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6317,21 +7911,28 @@ class Test_TC_CC_4_1 : public TestCommandBridge { 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); + [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(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 68U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 92U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_4() + CHIP_ERROR TestWait10s_8() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6344,9 +7945,8 @@ class Test_TC_CC_4_1 : public TestCommandBridge { 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)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 85U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 115U)); NextTest(); }]; @@ -6354,7 +7954,14 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToSaturationCommandToDut_5() + CHIP_ERROR TestWait10s_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6362,32 +7969,28 @@ class Test_TC_CC_4_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:90U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToSaturation command to DUT Error: %@", err); + [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(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 110U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 120U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_6() + CHIP_ERROR TestWait5s_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_7() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6396,19 +7999,36 @@ class Test_TC_CC_4_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentSaturation attribute from DUT. Error: %@", err); + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 90U)); + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 120U)); } - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_14() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -6416,7 +8036,29 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6433,7 +8075,7 @@ class Test_TC_CC_4_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -6466,7 +8108,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT8_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -6500,264 +8141,234 @@ class Test_TC_CC_4_2 : 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.F00 && 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.F00 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToSaturation command to DUT with Saturation=60 and TransitionTime=0 " + "(immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToSaturationCommandToDutWithSaturation60AndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsCurrentSaturationAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveSaturation command to DUT with MoveMode Up\n"); + ChipLogProgress(chipTool, + " ***** Test Step 5 : 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 = TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5(); + err = TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentSaturation attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7(); + err = TestThReadsCurrentSaturationAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentSaturation attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9(); + err = TestThReadsCurrentSaturationAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); - err = TestWait1000ms_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5s\n"); + err = TestWait5s_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11(); + err = TestThReadsCurrentSaturationAttributeFromDut_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends MoveSaturation command to DUT with MoveMode Down\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH sends MoveToSaturation command to DUT with Saturation=120 and TransitionTime=0 " + "(immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12(); + err = TestThSendsMoveToSaturationCommandToDutWithSaturation120AndTransitionTime0Immediately_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 1000ms\n"); - err = TestWait1000ms_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 100ms\n"); + err = TestWait100ms_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH sends MoveSaturation command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14(); + err = TestThSendsMoveSaturationCommandToDutWithMoveMode0x03DownAndRate5UnitsS_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); - err = TestWait1000ms_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 10s\n"); + err = TestWait10s_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16(); + err = TestThReadsCurrentSaturationAttributeFromDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); - err = TestWait1000ms_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 10s\n"); + err = TestWait10s_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18(); + err = TestThReadsCurrentSaturationAttributeFromDut_18(); break; case 19: - ChipLogProgress(chipTool, - " ***** Test Step 19 : TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed " - "Saturation\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 10s\n"); + err = TestWait10s_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 1000ms\n"); - err = TestWait1000ms_20(); + err = TestThReadsCurrentSaturationAttributeFromDut_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 21 : 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_21(); + err = TestThSendsMoveToSaturationCommandToDutWithSaturation150AndTransitionTime0Immediately_21(); break; case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 100ms\n"); + err = TestWait100ms_22(); + break; + case 23: ChipLogProgress(chipTool, - " ***** Test Step 22 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " - "Maximum allowed.\n"); + " ***** Test Step 23 : 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 = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); - err = TestWait1000ms_23(); + err = TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads CurrentSaturation attribute from DUT.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 10s\n"); + err = TestWait10s_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); - err = TestWait1000ms_25(); + err = TestThReadsCurrentSaturationAttributeFromDut_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : CurrentSaturation value Stops incrementing\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 26 : TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { NextTest(); return; } - err = TestCurrentSaturationValueStopsIncrementing_26(); + err = TestThSendsMoveSaturationCommandToDutWithMoveMode0x00StopAndRate5UnitsS_26(); break; case 27: - ChipLogProgress(chipTool, - " ***** Test Step 27 : TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed " - "Saturation\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27(); + err = TestThReadsCurrentSaturationAttributeFromDut_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 1000ms\n"); - err = TestWait1000ms_28(); + ChipLogProgress(chipTool, " ***** Test Step 28 : Wait 2s\n"); + err = TestWait2s_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29(); + err = TestThReadsCurrentSaturationAttributeFromDut_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 1000ms\n"); - err = TestWait1000ms_30(); - break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads CurrentSaturation attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31(); - break; - case 32: - ChipLogProgress(chipTool, - " ***** Test Step 32 : TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " - "Minimum allowed\n"); - if (ShouldSkip("CC.S.F00 && CC.S.C04.Rsp")) { - NextTest(); - return; - } - err = TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32(); - break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); - err = TestWait1000ms_33(); - break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_34(); + err = TestThReadsColorModeAttributeFromDut_30(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); - err = TestWait1000ms_35(); - break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : CurrentSaturation value Stops decrementing\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C04.Rsp")) { + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { NextTest(); return; } - err = TestCurrentSaturationValueStopsDecrementing_36(); + err = TestThReadsEnhancedColorModeAttributeFromDut_31(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_37(); + err = TestTurnOffLightThatWeTurnedOn_32(); break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33(); break; } @@ -6872,21 +8483,6 @@ class Test_TC_CC_4_2 : public TestCommandBridge { case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -6900,12 +8496,11 @@ class Test_TC_CC_4_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 39; + const uint16_t mTestCount = 34; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -6915,46 +8510,46 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsOnCommandToDut_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); + [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("OnOff", actualValue, 1)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation60AndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -6962,44 +8557,33 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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); + __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 moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=60 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 TestThReadsCurrentSaturationAttributeFromDut_4() + CHIP_ERROR TestWait100ms_4() { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUp_5() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7009,30 +8593,30 @@ class Test_TC_CC_4_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + 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 Up Error: %@", err); + [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(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait10s_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_7() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7041,13 +8625,12 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times Error: %@", err); + 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)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); NextTest(); }]; @@ -7055,14 +8638,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait10s_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_9() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7071,12 +8654,11 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times Error: %@", 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(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 235U)); VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); NextTest(); @@ -7085,14 +8667,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_10() + CHIP_ERROR TestWait5s_10() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_11() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7101,13 +8683,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times Error: %@", err); + 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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 254U)); + } NextTest(); }]; @@ -7115,40 +8698,41 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDown_12() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation120AndTransitionTime0Immediately_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = [NSNumber numberWithUnsignedChar:120U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Down Error: %@", err); + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=120 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_13() + CHIP_ERROR TestWait100ms_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_14() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x03DownAndRate5UnitsS_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7156,29 +8740,33 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + moveSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH sends MoveSaturation command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s) Error: %@", err); - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_15() + CHIP_ERROR TestWait10s_15() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_16() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7187,13 +8775,12 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); + 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)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 60U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 80U)); NextTest(); }]; @@ -7201,14 +8788,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_17() + CHIP_ERROR TestWait10s_17() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_18() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7217,13 +8804,12 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); + 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)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 5U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 35U)); NextTest(); }]; @@ -7231,42 +8817,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeUpToTheMaximumAllowedSaturation_19() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster - moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Up to the Maximum allowed Saturation Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_20() + CHIP_ERROR TestWait10s_19() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_21() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7279,9 +8837,8 @@ class Test_TC_CC_4_2 : public TestCommandBridge { 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)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 10U)); NextTest(); }]; @@ -7289,7 +8846,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMaximumAllowed_22() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation150AndTransitionTime0Immediately_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7297,35 +8854,33 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + __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 moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " - @"Maximum allowed. 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_23() + CHIP_ERROR TestWait100ms_22() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - NSNumber * _Nonnull CurrentSaturationStep4d; - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_24() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x01UpAndRate5UnitsS_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7333,32 +8888,32 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation 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("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - { - CurrentSaturationStep4d = value; - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_25() + CHIP_ERROR TestWait10s_24() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCurrentSaturationValueStopsIncrementing_26() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7367,14 +8922,12 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"CurrentSaturation value Stops incrementing Error: %@", err); + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationStep4d)); - } + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); NextTest(); }]; @@ -7382,7 +8935,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeDownToTheMinimumAllowedSaturation_27() + CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveMode0x00StopAndRate5UnitsS_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7391,17 +8944,15 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; + params.moveMode = [NSNumber numberWithUnsignedChar:0U]; + params.rate = [NSNumber numberWithUnsignedChar:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveSaturationWithParams:params completionHandler:^(NSError * _Nullable err) { NSLog( - @"TH sends MoveSaturation command to DUT with MoveMode Down to the Minimum allowed Saturation Error: %@", - err); + @"TH sends MoveSaturation command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7410,16 +8961,9 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + NSNumber * _Nonnull CurrentSaturationValueStep4e; - CHIP_ERROR TestWait1000ms_28() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull CurrentSaturationStep5b; - - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_29() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7428,15 +8972,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); + 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)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 170U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); { - CurrentSaturationStep5b = value; + CurrentSaturationValueStep4e = value; } NextTest(); @@ -7445,14 +8988,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_30() + CHIP_ERROR TestWait2s_28() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDutSeveralTimes_31() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7461,14 +9004,14 @@ class Test_TC_CC_4_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT several times. Error: %@", err); + 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], CurrentSaturationStep5b)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationValueStep4e)); + } NextTest(); }]; @@ -7476,43 +9019,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveSaturationCommandToDutWithMoveModeStopBeforeSaturationReachesTheMinimumAllowed_32() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:50U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveSaturation command to DUT with MoveMode Stop before Saturation reaches the " - @"Minimum allowed Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestWait1000ms_33() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - NSNumber * _Nonnull CurrentSaturationStep5d; - - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_34() + CHIP_ERROR TestThReadsColorModeAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7520,17 +9027,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); - { - CurrentSaturationStep5d = value; - } + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -7538,14 +9041,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_35() - { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); - } - - CHIP_ERROR TestCurrentSaturationValueStopsDecrementing_36() + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7553,15 +9049,13 @@ class Test_TC_CC_4_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"CurrentSaturation value Stops decrementing Error: %@", err); + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, CurrentSaturationStep5d)); - } + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -7569,7 +9063,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7586,7 +9080,7 @@ class Test_TC_CC_4_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -7619,7 +9113,6 @@ class Test_TC_CC_4_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepSizeConfigValue", 0, UINT8_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -7653,92 +9146,216 @@ class Test_TC_CC_4_3 : 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.F00 && 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.F00 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToSaturation command to DUT with Saturation=200 and TransitionTime=0 " + "(immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToSaturationCommandToDutWithSaturation200AndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsCurrentSaturationAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends StepSaturation command to DUT with StepMode Up\n"); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=40 and " + "TransitionTime=200 (20s)\n"); if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestThSendsStepSaturationCommandToDutWithStepModeUp_5(); + err = TestThSendsStepSaturationCommandToDutWithStepMode0x01UpStepSize40AndTransitionTime20020s_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime,TH read CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7(); + err = TestThReadsCurrentSaturationAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends StepSaturation command to DUT with StepMode Down\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 5s\n"); + err = TestWait5s_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=20 and " + "TransitionTime=100 (10s)\n"); if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { NextTest(); return; } - err = TestThSendsStepSaturationCommandToDutWithStepModeDown_8(); + err = TestThSendsStepSaturationCommandToDutWithStepMode0x01UpStepSize20AndTransitionTime10010s_12(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 10s\n"); + err = TestWait10s_13(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime,TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F00 && CC.S.A0001 && CC.S.C05.Rsp")) { + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { NextTest(); return; } - err = TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10(); + err = TestThReadsCurrentSaturationAttributeFromDut_14(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH sends MoveToSaturation command to DUT with Saturation=50 and TransitionTime=0 " + "(immediately)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C03.Rsp")) { + NextTest(); + return; + } + err = TestThSendsMoveToSaturationCommandToDutWithSaturation50AndTransitionTime0Immediately_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); + err = TestWait100ms_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=40 and " + "TransitionTime=200 (20s)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepSaturationCommandToDutWithStepMode0x03DownStepSize40AndTransitionTime20020s_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); + err = TestWait10s_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); + err = TestWait10s_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 5s\n"); + err = TestWait5s_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=20 and " + "TransitionTime=100 (10 s)\n"); + if (ShouldSkip("CC.S.F00 && CC.S.C05.Rsp")) { + NextTest(); + return; + } + err = TestThSendsStepSaturationCommandToDutWithStepMode0x03DownStepSize20AndTransitionTime10010S_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 10s\n"); + err = TestWait10s_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_11(); + err = TestTurnOffLightThatWeTurnedOn_29(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30(); break; } @@ -7790,65 +9407,269 @@ class Test_TC_CC_4_3 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. ContinueOnChipMainThread(CHIP_NO_ERROR); } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 31; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional 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 TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() + { + 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(@"TH sends On command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation200AndTransitionTime0Immediately_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = [NSNumber numberWithUnsignedChar:200U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=200 and TransitionTime=0 " + @"(immediately) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x01UpStepSize40AndTransitionTime20020s_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:40U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:200U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=40 and " + @"TransitionTime=200 (20s) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_7() + { + 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)); -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 210U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 230U)); - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mStepSizeConfigValue; - chip::Optional mTimeout; + NextTest(); + }]; - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_8() { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests 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(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 230U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 240U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestWait5s_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 240U)); } NextTest(); @@ -7857,7 +9678,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x01UpStepSize20AndTransitionTime10010s_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7865,21 +9686,34 @@ class Test_TC_CC_4_3 : public TestCommandBridge { 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); + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedChar:20U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:100U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster stepSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x01 (up), StepSize=20 and " + @"TransitionTime=100 (10s) 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 TestThReadsCurrentSaturationAttributeFromDut_4() + CHIP_ERROR TestWait10s_13() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7892,9 +9726,10 @@ class Test_TC_CC_4_3 : public TestCommandBridge { 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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 254U)); + } NextTest(); }]; @@ -7902,7 +9737,41 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeUp_5() + CHIP_ERROR TestThSendsMoveToSaturationCommandToDutWithSaturation50AndTransitionTime0Immediately_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.saturation = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToSaturation command to DUT with Saturation=50 and TransitionTime=0 " + @"(immediately) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_16() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x03DownStepSize40AndTransitionTime20020s_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7911,15 +9780,16 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:15U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = [NSNumber numberWithUnsignedChar:40U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:200U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode Up Error: %@", err); + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=40 and " + @"TransitionTime=200 (20s) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7929,14 +9799,14 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait10s_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeTHReadCurrentSaturationAttributeFromDut_7() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7945,13 +9815,72 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,TH read CurrentSaturation attribute from DUT Error: %@", 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)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 25U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 35U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_20() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 10U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 15U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait5s_22() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_23() + { + 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)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 10U)); + } NextTest(); }]; @@ -7959,7 +9888,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepModeDown_8() + CHIP_ERROR TestThSendsStepSaturationCommandToDutWithStepMode0x03DownStepSize20AndTransitionTime10010S_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -7969,14 +9898,15 @@ class Test_TC_CC_4_3 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; params.stepMode = [NSNumber numberWithUnsignedChar:3U]; - params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mStepSizeConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:15U]; - params.transitionTime = [NSNumber numberWithUnsignedChar:10U]; + params.stepSize = [NSNumber numberWithUnsignedChar:20U]; + params.transitionTime = [NSNumber numberWithUnsignedChar:100U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster stepSaturationWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepSaturation command to DUT with StepMode Down Error: %@", err); + NSLog(@"TH sends StepSaturation command to DUT with StepMode=0x03 (down), StepSize=20 and " + @"TransitionTime=100 (10 s) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -7986,14 +9916,14 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestWait10s_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeTHReadsCurrentSaturationAttributeFromDut_10() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8002,13 +9932,58 @@ class Test_TC_CC_4_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,TH reads CurrentSaturation attribute from DUT Error: %@", 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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 0U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_27() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_28() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -8016,7 +9991,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8033,7 +10008,7 @@ class Test_TC_CC_4_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8066,8 +10041,6 @@ class Test_TC_CC_4_4 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("hueConfigValue", 0, UINT8_MAX, &mHueConfigValue); - AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -8101,88 +10074,144 @@ class Test_TC_CC_4_4 : 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.F00 && 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.F00 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToHueAndSaturation command to DUT with Hue=200, Saturation=50 and " + "TransitionTime=0 (immediately)\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToHueAndSaturationCommandToDutWithHue200Saturation50AndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentHue attribute from DUT.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsCurrentHueAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentHue attribute from DUT.\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentSaturationAttributeFromDut_5(); + err = TestThReadsCurrentHueAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToHueAndSaturation command to DUT.\n"); + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends MoveToHueAndSaturation command to DUT with Hue=160, Saturation=80 and " + "TransitionTime=200 (20s)\n"); if (ShouldSkip("CC.S.F01 && CC.S.C06.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToHueAndSaturationCommandToDut_6(); + err = TestThSendsMoveToHueAndSaturationCommandToDutWithHue160Saturation80AndTransitionTime20020s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); - err = TestWait1500ms_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 10s\n"); + err = TestWait10s_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0000 && CC.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8(); + err = TestThReadsCurrentHueAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentSaturation attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A0001 && CC.S.C06.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9(); + err = TestThReadsCurrentSaturationAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 10s\n"); + err = TestWait10s_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 5s\n"); + err = TestWait5s_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0000")) { + NextTest(); + return; + } + err = TestThReadsCurrentHueAttributeFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_10(); + err = TestTurnOffLightThatWeTurnedOn_18(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19(); break; } @@ -8231,6 +10260,30 @@ class Test_TC_CC_4_4 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -8244,13 +10297,11 @@ class Test_TC_CC_4_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mHueConfigValue; - chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -8260,14 +10311,36 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() { 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); + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -8277,29 +10350,70 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDutWithHue200Saturation50AndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + params.hue = [NSNumber numberWithUnsignedChar:200U]; + params.saturation = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToHueAndSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=200, Saturation=50 and " + @"TransitionTime=0 (immediately) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + 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)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("CurrentHue", actualValue, 200U)); } + VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDutWithHue160Saturation80AndTransitionTime20020s_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8307,21 +10421,34 @@ class Test_TC_CC_4_4 : public TestCommandBridge { 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); + __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + params.hue = [NSNumber numberWithUnsignedChar:160U]; + params.saturation = [NSNumber numberWithUnsignedChar:80U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:200U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToHueAndSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToHueAndSaturation command to DUT with Hue=160, Saturation=80 and " + @"TransitionTime=200 (20s) 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 TestThReadsCurrentHueAttributeFromDut_4() + CHIP_ERROR TestWait10s_7() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8330,13 +10457,12 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentHue attribute from DUT. Error: %@", err); + NSLog(@"TH reads CurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 175U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 185U)); NextTest(); }]; @@ -8344,7 +10470,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_5() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8357,9 +10483,8 @@ class Test_TC_CC_4_4 : public TestCommandBridge { 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)); + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 60U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 70U)); NextTest(); }]; @@ -8367,7 +10492,14 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToHueAndSaturationCommandToDut_6() + CHIP_ERROR TestWait10s_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8375,34 +10507,51 @@ class Test_TC_CC_4_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.hue = mHueConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mHueConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:40U]; - params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:160U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToHueAndSaturation command to 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)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 160U)); + VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 170U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_12() + { + 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], 70U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 80U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_7() + CHIP_ERROR TestWait5s_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentHueAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentHueAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8411,26 +10560,22 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentHue attribute from DUT Error: %@", 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, mHueConfigValue.HasValue() ? mHueConfigValue.Value() : 40U)); + VerifyOrReturn(CheckValue("CurrentHue", actualValue, 160U)); } - VerifyOrReturn(CheckConstraintType("currentHue", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentHue", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentHue", [value unsignedCharValue], 254U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentSaturationAttributeFromDut_9() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -8439,19 +10584,58 @@ class Test_TC_CC_4_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentSaturationWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentSaturation attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentSaturation attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue( - "CurrentSaturation", actualValue, mSaturationConfigValue.HasValue() ? mSaturationConfigValue.Value() : 160U)); + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 80U)); } - VerifyOrReturn(CheckConstraintType("currentSaturation", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 254U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -8459,7 +10643,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8476,7 +10660,7 @@ class Test_TC_CC_4_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -8542,360 +10726,432 @@ class Test_TC_CC_5_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.F03 && 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.F03 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " + "TransitionTime = 0 (immediate)\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToColorCommandToDutWithColorX327680x8000ColorY196600x4CCCTransitionTime0Immediate_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_4(); + err = TestThReadsCurrentXAttributeFromDut_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_5(); + err = TestThReadsCurrentYAttributeFromDut_6(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveToColor command to DUT\n"); + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + "TransitionTime = 200 (20s)\n"); if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); - err = TestWait1500ms_7(); + err = TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime20020s_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { - NextTest(); - return; - } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); + err = TestThReadsCurrentXAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_10(); + err = TestThReadsCurrentYAttributeFromDut_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads Options attribute\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { - NextTest(); - return; - } - err = TestThReadsOptionsAttribute_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 10s\n"); + err = TestWait10s_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Turn on light for color control tests\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestTurnOnLightForColorControlTests_12(); + err = TestThReadsCurrentXAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends MoveToColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_13(); + err = TestThReadsCurrentYAttributeFromDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 100ms\n"); - err = TestWait100ms_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 5s\n"); + err = TestWait5s_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_15(); + err = TestThReadsCurrentXAttributeFromDut_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_16(); + err = TestThReadsCurrentYAttributeFromDut_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_17(); + err = TestThWrites0ToTheOptionsAttribute_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends MoveToColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH read Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_18(); + err = TestThReadOptionsAttribute_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 100ms\n"); - err = TestWait100ms_19(); + ChipLogProgress(chipTool, + " ***** Test Step 19 : TH sends a MoveToColor command to the DUT with ColorX = 32768/0x8000 (x=0.5) (purple) " + "ColorY = 19660/0x4CCC (y=0.3) TransitionTime = 0 (immediate)\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToColorCommandToTheDutWithColorX327680x8000X05PurpleColorY196600x4CCCY03TransitionTime0Immediate_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 100ms\n"); + err = TestWait100ms_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_20(); + err = TestThReadsCurrentXAttributeFromDut_21(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_21(); + err = TestThReadsCurrentYAttributeFromDut_22(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends MoveToColor command to DUT\n"); + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_23(); + break; + case 24: + ChipLogProgress(chipTool, + " ***** Test Step 24 : TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + "TransitionTime = 0 (immediate)\n"); if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_22(); + err = TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime0Immediate_24(); break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 100ms\n"); - err = TestWait100ms_23(); + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 100ms\n"); + err = TestWait100ms_25(); break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_24(); + err = TestThReadsCurrentXAttributeFromDut_26(); break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_25(); + err = TestThReadsCurrentYAttributeFromDut_27(); break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends MoveToColor command to DUT\n"); + case 28: + ChipLogProgress(chipTool, + " ***** Test Step 28 : TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " + "TransitionTime = 0 (immediate)\n"); if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_26(); + err = TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY327680x8000TransitionTime0Immediate_28(); break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 100ms\n"); - err = TestWait100ms_27(); + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Wait 100ms\n"); + err = TestWait100ms_29(); break; - case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_28(); + err = TestThReadsCurrentXAttributeFromDut_30(); break; - case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 31: + ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_29(); + err = TestThReadsCurrentYAttributeFromDut_31(); break; - case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH writes 1 to the Options attribute\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { + case 32: + ChipLogProgress(chipTool, + " ***** Test Step 32 : TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " + "TransitionTime = 0 (immediate)\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThWrites1ToTheOptionsAttribute_30(); + err = TestThSendsMoveToColorCommandToDutWithColorX262140x6666ColorY327680x8000TransitionTime0Immediate_32(); break; - case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads Options attribute\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A000f")) { + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 100ms\n"); + err = TestWait100ms_33(); + break; + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThReadsOptionsAttribute_31(); + err = TestThReadsCurrentXAttributeFromDut_34(); break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Turn on light for color control tests\n"); + case 35: + ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : TH writes 1 to the Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { + NextTest(); + return; + } + err = TestThWrites1ToTheOptionsAttribute_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : TH read Options attribute\n"); + if (ShouldSkip("CC.S.A000f")) { + NextTest(); + return; + } + err = TestThReadOptionsAttribute_37(); + break; + case 38: + ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends On command to DUT\n"); if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestTurnOnLightForColorControlTests_32(); + err = TestThSendsOnCommandToDut_38(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends MoveToColor command to DUT\n"); + case 39: + ChipLogProgress(chipTool, + " ***** Test Step 39 : TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " + "TransitionTime = 0 (immediate)\n"); if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_33(); + err = TestThSendsMoveToColorCommandToDutWithColorX327680x8000ColorY196600x4CCCTransitionTime0Immediate_39(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 100ms\n"); - err = TestWait100ms_34(); + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Wait 100ms\n"); + err = TestWait100ms_40(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_35(); + err = TestThReadsCurrentXAttributeFromDut_41(); break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 42: + ChipLogProgress(chipTool, " ***** Test Step 42 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_36(); + err = TestThReadsCurrentYAttributeFromDut_42(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + case 43: + ChipLogProgress(chipTool, " ***** Test Step 43 : TH sends Off command to DUT\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_37(); + err = TestThSendsOffCommandToDut_43(); break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends MoveToColor command to DUT\n"); + case 44: + ChipLogProgress(chipTool, + " ***** Test Step 44 : TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + "TransitionTime = 0 (immediate)\n"); if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_38(); + err = TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime0Immediate_44(); break; - case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : Wait 100ms\n"); - err = TestWait100ms_39(); + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Wait 100ms\n"); + err = TestWait100ms_45(); break; - case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_40(); + err = TestThReadsCurrentXAttributeFromDut_46(); break; - case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 47: + ChipLogProgress(chipTool, " ***** Test Step 47 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_41(); + err = TestThReadsCurrentYAttributeFromDut_47(); break; - case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : TH sends MoveToColor command to DUT\n"); + case 48: + ChipLogProgress(chipTool, + " ***** Test Step 48 : TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " + "TransitionTime = 0 (immediate)\n"); if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_42(); + err = TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY327680x8000TransitionTime0Immediate_48(); break; - case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : Wait 100ms\n"); - err = TestWait100ms_43(); + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Wait 100ms\n"); + err = TestWait100ms_49(); break; - case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + case 50: + ChipLogProgress(chipTool, " ***** Test Step 50 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_44(); + err = TestThReadsCurrentXAttributeFromDut_50(); break; - case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 51: + ChipLogProgress(chipTool, " ***** Test Step 51 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_45(); + err = TestThReadsCurrentYAttributeFromDut_51(); break; - case 46: - ChipLogProgress(chipTool, " ***** Test Step 46 : TH sends MoveToColor command to DUT\n"); + case 52: + ChipLogProgress(chipTool, + " ***** Test Step 52 : TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " + "TransitionTime = 0 (immediate)\n"); if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThSendsMoveToColorCommandToDut_46(); + err = TestThSendsMoveToColorCommandToDutWithColorX262140x6666ColorY327680x8000TransitionTime0Immediate_52(); break; - case 47: - ChipLogProgress(chipTool, " ***** Test Step 47 : Wait 100ms\n"); - err = TestWait100ms_47(); + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : Wait 100ms\n"); + err = TestWait100ms_53(); break; - case 48: - ChipLogProgress(chipTool, " ***** Test Step 48 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); + case 54: + ChipLogProgress(chipTool, " ***** Test Step 54 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_48(); + err = TestThReadsCurrentXAttributeFromDut_54(); break; - case 49: - ChipLogProgress(chipTool, " ***** Test Step 49 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_49(); + err = TestThReadsCurrentYAttributeFromDut_55(); + break; + case 56: + ChipLogProgress(chipTool, " ***** Test Step 56 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_56(); + break; + case 57: + ChipLogProgress(chipTool, " ***** Test Step 57 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_57(); break; } @@ -9058,6 +11314,30 @@ class Test_TC_CC_5_1 : public TestCommandBridge { case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 50: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 51: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 52: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 53: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 54: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 55: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 56: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 57: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -9071,7 +11351,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 50; + const uint16_t mTestCount = 58; chip::Optional mNodeId; chip::Optional mCluster; @@ -9085,46 +11365,46 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsOnCommandToDut_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); + [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("OnOff", actualValue, 1)); - } - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX327680x8000ColorY196600x4CCCTransitionTime0Immediate_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9132,21 +11412,34 @@ class Test_TC_CC_5_1 : public TestCommandBridge { 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); + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.colorX = [NSNumber numberWithUnsignedShort:32768U]; + params.colorY = [NSNumber numberWithUnsignedShort:19660U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " + @"TransitionTime = 0 (immediate) 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 TestThReadsCurrentXAttributeFromDut_4() + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9159,9 +11452,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { 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)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentX", actualValue, 32768U)); + } NextTest(); }]; @@ -9169,7 +11463,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9182,9 +11476,10 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentY", actualValue, 19660U)); + } NextTest(); }]; @@ -9192,7 +11487,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_6() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime20020s_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9203,12 +11498,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; params.colorX = [NSNumber numberWithUnsignedShort:13107U]; params.colorY = [NSNumber numberWithUnsignedShort:13107U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:200U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + @"TransitionTime = 200 (20s) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9218,14 +11515,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_7() + CHIP_ERROR TestWait10s_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9234,18 +11531,34 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("CurrentX", actualValue, 13107U)); - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 32768U)); - VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_10() + { + 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(CheckConstraintMinValue("currentY", [value unsignedShortValue], 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 19660U)); NextTest(); }]; @@ -9253,7 +11566,36 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() + CHIP_ERROR TestWait10s_11() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_12() + { + 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(CheckConstraintMinValue("currentX", [value unsignedShortValue], 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 15073U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9262,26 +11604,51 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 13107U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 15073U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait5s_14() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("CurrentY", actualValue, 13107U)); + VerifyOrReturn(CheckValue("CurrentX", actualValue, 13107U)); } - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_10() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9289,21 +11656,23 @@ class Test_TC_CC_5_1 : public TestCommandBridge { 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); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentY", actualValue, 13107U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_11() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9315,7 +11684,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { optionsArgument = [NSNumber numberWithUnsignedChar:0U]; [cluster writeAttributeOptionsWithValue:optionsArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH reads Options attribute Error: %@", err); + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9325,24 +11694,31 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOnLightForColorControlTests_12() + CHIP_ERROR TestThReadOptionsAttribute_18() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH read Options attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("Options", actualValue, 0U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_13() + CHIP_ERROR TestThSendsAMoveToColorCommandToTheDutWithColorX327680x8000X05PurpleColorY196600x4CCCY03TransitionTime0Immediate_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9358,7 +11734,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends a MoveToColor command to the DUT with ColorX = 32768/0x8000 (x=0.5) (purple) ColorY = " + @"19660/0x4CCC (y=0.3) TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9368,14 +11746,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_14() + CHIP_ERROR TestWait100ms_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_15() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9384,7 +11762,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9399,7 +11777,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_16() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9408,7 +11786,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9423,7 +11801,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_17() + CHIP_ERROR TestThSendsOffCommandToDut_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -9440,7 +11818,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_18() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime0Immediate_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9456,7 +11834,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + @"TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9466,14 +11846,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_19() + CHIP_ERROR TestWait100ms_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9482,7 +11862,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9497,7 +11877,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_21() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9506,7 +11886,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9521,7 +11901,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_22() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY327680x8000TransitionTime0Immediate_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9537,7 +11917,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9547,14 +11929,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_23() + CHIP_ERROR TestWait100ms_29() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_24() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9563,7 +11945,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9578,7 +11960,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_25() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9587,7 +11969,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9602,7 +11984,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_26() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX262140x6666ColorY327680x8000TransitionTime0Immediate_32() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9618,7 +12000,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9628,14 +12012,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_27() + CHIP_ERROR TestWait100ms_33() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_28() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9644,7 +12028,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9659,7 +12043,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_29() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9668,7 +12052,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9683,7 +12067,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites1ToTheOptionsAttribute_30() + CHIP_ERROR TestThWrites1ToTheOptionsAttribute_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9705,7 +12089,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_31() + CHIP_ERROR TestThReadOptionsAttribute_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9713,28 +12097,30 @@ class Test_TC_CC_5_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - id optionsArgument; - optionsArgument = [NSNumber numberWithUnsignedChar:1U]; - [cluster writeAttributeOptionsWithValue:optionsArgument - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH reads Options attribute Error: %@", err); + [cluster readAttributeOptionsWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH read Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("Options", actualValue, 1U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOnLightForColorControlTests_32() + CHIP_ERROR TestThSendsOnCommandToDut_38() { 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); + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9744,7 +12130,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_33() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX327680x8000ColorY196600x4CCCTransitionTime0Immediate_39() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9760,7 +12146,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 32768/0x8000 ColorY = 19660/0x4CCC " + @"TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9770,14 +12158,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_34() + CHIP_ERROR TestWait100ms_40() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_35() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_41() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9786,7 +12174,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9801,7 +12189,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_36() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_42() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9810,7 +12198,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9825,14 +12213,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() + CHIP_ERROR TestThSendsOffCommandToDut_43() { 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(@"TH sends Off command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9842,7 +12230,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_38() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY131070x3333TransitionTime0Immediate_44() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9858,7 +12246,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 13107/0x3333 " + @"TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9868,14 +12258,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_39() + CHIP_ERROR TestWait100ms_45() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_40() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_46() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9884,7 +12274,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9899,7 +12289,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_41() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_47() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9908,7 +12298,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9923,7 +12313,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_42() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX131070x3333ColorY327680x8000TransitionTime0Immediate_48() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9939,7 +12329,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 13107/0x3333 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9949,14 +12341,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_43() + CHIP_ERROR TestWait100ms_49() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_44() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_50() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9965,7 +12357,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -9980,7 +12372,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_45() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_51() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -9989,7 +12381,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10004,7 +12396,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveToColorCommandToDut_46() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX262140x6666ColorY327680x8000TransitionTime0Immediate_52() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10020,7 +12412,9 @@ class Test_TC_CC_5_1 : public TestCommandBridge { params.optionsOverride = [NSNumber numberWithUnsignedChar:1U]; [cluster moveToColorWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveToColor command to DUT Error: %@", err); + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 26214/0x6666 ColorY = 32768/0x8000 " + @"TransitionTime = 0 (immediate) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10030,14 +12424,14 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait100ms_47() + CHIP_ERROR TestWait100ms_53() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_48() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_54() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10046,7 +12440,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10061,7 +12455,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_49() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_55() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10070,7 +12464,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10084,6 +12478,50 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_56() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_57() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_CC_5_2 : public TestCommandBridge { @@ -10096,8 +12534,6 @@ class Test_TC_CC_5_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateXValue", INT16_MIN, INT16_MAX, &mRateXValue); - AddArgument("RateYValue", INT16_MIN, INT16_MAX, &mRateYValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -10131,112 +12567,158 @@ class Test_TC_CC_5_2 : 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.F03 && 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.F03 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 26000 TransitionTime = 0 " + "(immediate)\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToColorCommandToDutWithColorX33000ColorY26000TransitionTime0Immediate_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends MoveColor command to DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_4(); + err = TestThSendsMoveColorCommandToDut_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_5(); + err = TestThReadsCurrentXAttributeFromDut_7(); break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C08.Rsp")) { + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorCommandToDut_6(); + err = TestThReadsCurrentYAttributeFromDut_8(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1000ms\n"); - err = TestWait1000ms_7(); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 10s\n"); + err = TestWait10s_9(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentX attribute from DUT\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentX attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_8(); + err = TestThReadsCurrentXAttributeFromDut_10(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentY attribute from DUT\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentY attribute from DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_9(); + err = TestThReadsCurrentYAttributeFromDut_11(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends StopMoveStep command to DUT\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10s\n"); + err = TestWait10s_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentXAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends StopMoveStep command to DUT\n"); if (ShouldSkip("CC.S.F03 && CC.S.C47.Rsp")) { NextTest(); return; } - err = TestThSendsStopMoveStepCommandToDut_10(); + err = TestThSendsStopMoveStepCommandToDut_15(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C47.Rsp")) { + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentXAttributeFromDut_11(); + err = TestThReadsCurrentXAttributeFromDut_16(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C47.Rsp")) { + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_12(); + err = TestThReadsCurrentYAttributeFromDut_17(); break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Turn off light that we turned on\n"); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_13(); + err = TestTurnOffLightThatWeTurnedOn_20(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Check on/off attribute value is false after off command\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21(); break; } @@ -10294,6 +12776,27 @@ class Test_TC_CC_5_2 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + 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. @@ -10307,13 +12810,11 @@ class Test_TC_CC_5_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateXValue; - chip::Optional mRateYValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -10323,14 +12824,36 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() { 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); + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10340,29 +12863,42 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX33000ColorY26000TransitionTime0Immediate_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.colorX = [NSNumber numberWithUnsignedShort:33000U]; + params.colorY = [NSNumber numberWithUnsignedShort:26000U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 26000 TransitionTime = 0 " + @"(immediate) Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsMoveColorCommandToDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10370,22 +12906,31 @@ class Test_TC_CC_5_2 : public TestCommandBridge { 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); + __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; + params.rateX = [NSNumber numberWithShort:-100]; + params.rateY = [NSNumber numberWithShort:100]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveColor command to DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentXValue; - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() + CHIP_ERROR TestWait10s_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10398,21 +12943,45 @@ class Test_TC_CC_5_2 : public TestCommandBridge { 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; - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 31500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 32500U)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_8() + { + 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(CheckConstraintMinValue("currentY", [value unsignedShortValue], 26500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 27500U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_9() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10420,17 +12989,13 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); - { - CurrentYValue = value; - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 30500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 31500U)); NextTest(); }]; @@ -10438,7 +13003,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorCommandToDut_6() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10446,32 +13011,29 @@ class Test_TC_CC_5_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.rateX = mRateXValue.HasValue() ? [NSNumber numberWithShort:mRateXValue.Value()] : [NSNumber numberWithShort:50]; - params.rateY = mRateYValue.HasValue() ? [NSNumber numberWithShort:mRateYValue.Value()] : [NSNumber numberWithShort:50]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster moveColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends MoveColor command to DUT Error: %@", err); + [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 27500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 28500U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_7() + CHIP_ERROR TestWait10s_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - NSNumber * _Nonnull CurrentXBeforeStopCommand; + NSNumber * _Nonnull CurrentXValue; - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10484,11 +13046,10 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 29500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 30500U)); { - CurrentXBeforeStopCommand = value; + CurrentXValue = value; } NextTest(); @@ -10496,9 +13057,9 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentYBeforeStopCommand; + NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_9() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10511,11 +13072,10 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 28500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 29500U)); { - CurrentYBeforeStopCommand = value; + CurrentYValue = value; } NextTest(); @@ -10524,7 +13084,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStopMoveStepCommandToDut_10() + CHIP_ERROR TestThSendsStopMoveStepCommandToDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10547,7 +13107,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_11() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10560,9 +13120,8 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentX", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], CurrentXBeforeStopCommand)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 29500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 30500U)); NextTest(); }]; @@ -10570,7 +13129,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_12() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10583,9 +13142,52 @@ class Test_TC_CC_5_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYBeforeStopCommand)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 28500U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 29500U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_19() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -10593,7 +13195,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_13() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -10610,7 +13212,7 @@ class Test_TC_CC_5_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_14() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -10643,8 +13245,6 @@ class Test_TC_CC_5_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepXConfigValue", INT16_MIN, INT16_MAX, &mStepXConfigValue); - AddArgument("StepYConfigValue", INT16_MIN, INT16_MAX, &mStepYConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -10678,88 +13278,136 @@ class Test_TC_CC_5_3 : 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.F03 && 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.F03 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 20000 TransitionTime = 0 " + "(immediate)\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C07.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsMoveToColorCommandToDutWithColorX33000ColorY20000TransitionTime0Immediate_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsCurrentXAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004")) { + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends StepColor command to DUT, with StepX = -2000, StepY = -6000, TransitionTime = 200 " + "(20s)\n"); + if (ShouldSkip("CC.S.F03 && CC.S.C09.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentYAttributeFromDut_5(); + err = TestThSendsStepColorCommandToDutWithStepX2000StepY6000TransitionTime20020s_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColor command to DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestThSendsStepColorCommandToDut_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 1500ms\n"); - err = TestWait1500ms_7(); + err = TestThReadsCurrentXAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Over TransitionTime, TH reads CurrentX attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8(); + err = TestThReadsCurrentYAttributeFromDut_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Over TransitionTime, TH reads CurrentY attribute from DUT\n"); - if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C09.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 10s\n"); + err = TestWait10s_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9(); + err = TestThReadsCurrentXAttributeFromDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5s\n"); + err = TestWait5s_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentX attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0003 && CC.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentXAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentY attribute from DUT\n"); + if (ShouldSkip("CC.S.F03 && CC.S.A0004 && CC.S.C08.Rsp")) { + NextTest(); + return; + } + err = TestThReadsCurrentYAttributeFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_16(); + break; + 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_10(); + err = TestTurnOffLightThatWeTurnedOn_17(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : 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_11(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18(); break; } @@ -10808,6 +13456,27 @@ class Test_TC_CC_5_3 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -10821,13 +13490,11 @@ class Test_TC_CC_5_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mStepXConfigValue; - chip::Optional mStepYConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -10837,14 +13504,36 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() { 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); + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -10854,29 +13543,42 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsMoveToColorCommandToDutWithColorX33000ColorY20000TransitionTime0Immediate_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.colorX = [NSNumber numberWithUnsignedShort:33000U]; + params.colorY = [NSNumber numberWithUnsignedShort:20000U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColor command to DUT, with ColorX = 33000 ColorY = 20000 TransitionTime = 0 " + @"(immediate) Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsStepColorCommandToDutWithStepX2000StepY6000TransitionTime20020s_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10884,22 +13586,35 @@ class Test_TC_CC_5_3 : public TestCommandBridge { 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); + __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; + params.stepX = [NSNumber numberWithShort:-20000]; + params.stepY = [NSNumber numberWithShort:-6000]; + params.transitionTime = [NSNumber numberWithUnsignedShort:200U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster + stepColorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog( + @"TH sends StepColor command to DUT, with StepX = -2000, StepY = -6000, TransitionTime = 200 (20s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentXValue; - CHIP_ERROR TestThReadsCurrentXAttributeFromDut_4() + CHIP_ERROR TestWait10s_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10912,21 +13627,16 @@ class Test_TC_CC_5_3 : public TestCommandBridge { 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; - } + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 13000U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 33000U)); NextTest(); }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull CurrentYValue; - CHIP_ERROR TestThReadsCurrentYAttributeFromDut_5() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10939,12 +13649,8 @@ class Test_TC_CC_5_3 : public TestCommandBridge { 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; - } + VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], 14000U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 20000U)); NextTest(); }]; @@ -10952,7 +13658,14 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorCommandToDut_6() + CHIP_ERROR TestWait10s_9() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10960,34 +13673,50 @@ class Test_TC_CC_5_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.stepX - = mStepXConfigValue.HasValue() ? [NSNumber numberWithShort:mStepXConfigValue.Value()] : [NSNumber numberWithShort:100]; - params.stepY - = mStepYConfigValue.HasValue() ? [NSNumber numberWithShort:mStepYConfigValue.Value()] : [NSNumber numberWithShort:100]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster stepColorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends StepColor command to DUT Error: %@", err); + [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads CurrentX attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentX", [value unsignedShortValue], 13000U)); + VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 14000U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_11() + { + 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(CheckConstraintMinValue("currentY", [value unsignedShortValue], 14000U)); + VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 15000U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_7() + CHIP_ERROR TestWait5s_12() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentXAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentXAttributeFromDut_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -10996,13 +13725,14 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentXWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentX attribute from DUT Error: %@", 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], CurrentXValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentX", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentX", actualValue, 13000U)); + } NextTest(); }]; @@ -11010,7 +13740,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeThReadsCurrentYAttributeFromDut_9() + CHIP_ERROR TestThReadsCurrentYAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11019,13 +13749,58 @@ class Test_TC_CC_5_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeCurrentYWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime, TH reads CurrentY attribute from DUT Error: %@", err); + NSLog(@"TH reads CurrentY attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("currentY", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("currentY", [value unsignedShortValue], CurrentYValue)); - VerifyOrReturn(CheckConstraintMaxValue("currentY", [value unsignedShortValue], 65279U)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentY", actualValue, 14000U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_15() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -11033,7 +13808,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11050,7 +13825,7 @@ class Test_TC_CC_5_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11116,88 +13891,148 @@ class Test_TC_CC_6_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.F04 && 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.F04 && CC.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, + " ***** Test Step 6 : TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=310 and " + "TransitionTime=0 (immediately).\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); + err = TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMireds310AndTransitionTime0Immediately_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Move To Color Temperature command\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C0A.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 100ms\n"); + err = TestWait100ms_7(); + break; + case 8: + ChipLogProgress(chipTool, + " ***** Test Step 8 : TH sends MoveToColorTemperatur command to DUT with ColorTemperatureMireds=250 and " + "TransitionTime=300 (30s).\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp")) { NextTest(); return; } - err = TestMoveToColorTemperatureCommand_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1500ms\n"); - err = TestWait1500ms_8(); + err = TestThSendsMoveToColorTemperaturCommandToDutWithColorTemperatureMireds250AndTransitionTime30030s_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 10s\n"); + err = TestWait10s_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTemprature_9(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_10(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Turn off light that we turned on\n"); + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 10s\n"); + err = TestWait10s_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 10s\n"); + err = TestWait10s_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 5s\n"); + err = TestWait5s_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C0a.Rsp")) { + NextTest(); + return; + } + err = TestThReadsColorTemperatureMiredsAttributeFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Turn Off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_10(); + err = TestTurnOffLightThatWeTurnedOn_19(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Check on/off attribute value is false after off command\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -11246,6 +14081,33 @@ class Test_TC_CC_6_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -11259,7 +14121,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; @@ -11273,69 +14135,47 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsOnCommandToDut_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); + [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("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; - } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11363,7 +14203,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11390,7 +14230,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11415,7 +14255,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestMoveToColorTemperatureCommand_7() + CHIP_ERROR TestThSendsMoveToColorTemperatureCommandToDutWithColorTemperatureMireds310AndTransitionTime0Immediately_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11424,13 +14264,15 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.colorTemperature = [ColorTempPhysicalMaxMiredsValue copy]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; + params.colorTemperature = [NSNumber numberWithUnsignedShort:310U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; [cluster moveToColorTemperatureWithParams:params completionHandler:^(NSError * _Nullable err) { - NSLog(@"Move To Color Temperature command Error: %@", err); + NSLog(@"TH sends MoveToColorTemperature command to DUT with ColorTemperatureMireds=310 and " + @"TransitionTime=0 (immediately). Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -11440,14 +14282,106 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_8() + CHIP_ERROR TestWait100ms_7() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsMoveToColorTemperaturCommandToDutWithColorTemperatureMireds250AndTransitionTime30030s_8() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + params.colorTemperature = [NSNumber numberWithUnsignedShort:250U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster moveToColorTemperatureWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends MoveToColorTemperatur command to DUT with ColorTemperatureMireds=250 and " + @"TransitionTime=300 (30s). Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_9() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_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. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 280U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 300U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_11() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_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. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 260U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 280U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTemprature_9() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -11456,20 +14390,87 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read current color temprature Error: %@", err); + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], 250U)); + VerifyOrReturn(CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], 260U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait5s_15() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorTemperatureWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorTemperatureMireds attribute from DUT. Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("ColorTemperature", actualValue, ColorTempPhysicalMaxMiredsValue)); + VerifyOrReturn(CheckValue("ColorTemperature", actualValue, 250U)); } - VerifyOrReturn(CheckConstraintType("colorTemperature", "int16u", "int16u")); - VerifyOrReturn( - CheckConstraintMinValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMinMiredsValue)); - VerifyOrReturn( - CheckConstraintMaxValue("colorTemperature", [value unsignedShortValue], ColorTempPhysicalMaxMiredsValue)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -11477,14 +14478,14 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_10() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_19() { 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)); @@ -11494,7 +14495,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_11() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -11560,260 +14561,252 @@ class Test_TC_CC_6_2 : 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.F04 && 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.F04 && CC.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + 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 = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + 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_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); - err = TestWait1000ms_10(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + 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_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 1000ms\n"); - err = TestWait1000ms_12(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); + err = TestWait1000ms_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Read current color temprature attribute from DUT several times\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 1000ms\n"); - err = TestWait1000ms_15(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + 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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 1000ms\n"); - err = TestWait1000ms_17(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 1000ms\n"); + err = TestWait1000ms_18(); + 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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 1000ms\n"); - err = TestWait1000ms_19(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + 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")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 1000ms\n"); - err = TestWait1000ms_23(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : Wait 1000ms\n"); + err = TestWait1000ms_24(); + 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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24(); - break; - case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); - err = TestWait1000ms_25(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : Wait 1000ms\n"); + err = TestWait1000ms_26(); + 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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Wait 1000ms\n"); - err = TestWait1000ms_27(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4b.Rsp")) { NextTest(); return; } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29(); + err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends MoveColorTemperature command to DUT with MoveMode = Stop\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4B.Rsp")) { - NextTest(); - return; - } - err = TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30(); + ChipLogProgress(chipTool, " ***** Test Step 30 : Wait 1000ms\n"); + err = TestWait1000ms_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : Wait 1000ms\n"); - err = TestWait1000ms_31(); - break; - case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + 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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31(); break; - case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : Wait 1000ms\n"); - err = TestWait1000ms_33(); + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Wait 1000ms\n"); + err = TestWait1000ms_32(); break; - case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + 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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33(); break; - case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : Wait 1000ms\n"); - err = TestWait1000ms_35(); + case 34: + ChipLogProgress(chipTool, " ***** Test Step 34 : Wait 1000ms\n"); + err = TestWait1000ms_34(); break; - case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : Read current color temprature attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4B.Rsp")) { + 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")) { NextTest(); return; } - err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36(); + err = TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35(); break; - case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : Turn off light that we turned on\n"); + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_37(); + err = TestTurnOffLightThatWeTurnedOn_36(); break; - case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : Check on/off attribute value is false after off command\n"); + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37(); break; } @@ -11940,9 +14933,6 @@ class Test_TC_CC_6_2 : public TestCommandBridge { case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -11956,7 +14946,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 39; + const uint16_t mTestCount = 38; chip::Optional mNodeId; chip::Optional mCluster; @@ -11970,69 +14960,47 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsOnCommandToDut_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); + [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("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; - } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12060,7 +15028,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12087,7 +15055,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12112,7 +15080,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_7() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12139,14 +15107,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_8() + CHIP_ERROR TestWait1000ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_9() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12171,14 +15139,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_10() + CHIP_ERROR TestWait1000ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_11() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12203,14 +15171,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_12() + CHIP_ERROR TestWait1000ms_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12235,7 +15203,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_14() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12262,14 +15230,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_15() + CHIP_ERROR TestWait1000ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_16() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12294,14 +15262,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_17() + CHIP_ERROR TestWait1000ms_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_18() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12326,14 +15294,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_19() + CHIP_ERROR TestWait1000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_20() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12358,7 +15326,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_21() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeUp_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12385,7 +15353,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_22() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12412,7 +15380,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_23() + CHIP_ERROR TestWait1000ms_22() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -12420,7 +15388,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureValue; - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_24() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12448,14 +15416,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_25() + CHIP_ERROR TestWait1000ms_24() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_26() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12485,14 +15453,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_27() + CHIP_ERROR TestWait1000ms_26() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_28() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_27() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12522,7 +15490,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_29() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeDown_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12549,7 +15517,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_30() + CHIP_ERROR TestThSendsMoveColorTemperatureCommandToDutWithMoveModeStop_29() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12576,7 +15544,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_31() + CHIP_ERROR TestWait1000ms_30() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; @@ -12584,7 +15552,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { } NSNumber * _Nonnull ColorTemperatureMoveModeStop; - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_32() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_31() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12612,14 +15580,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_33() + CHIP_ERROR TestWait1000ms_32() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_34() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_33() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12649,14 +15617,14 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_35() + CHIP_ERROR TestWait1000ms_34() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 1000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_36() + CHIP_ERROR TestReadCurrentColorTempratureAttributeFromDutSeveralTimes_35() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -12686,7 +15654,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_37() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_36() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12703,7 +15671,7 @@ class Test_TC_CC_6_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_38() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_37() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -12769,156 +15737,148 @@ class Test_TC_CC_6_3 : 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.F04 && 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.F04 && CC.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMinMireds attribute from DUT\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400b")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4(); + err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTempPhysicalMaxMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A400c")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads ColorTemperatureMireds attribute from DUT.\n"); + if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { NextTest(); return; } - err = TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5(); + err = TestThReadsColorTemperatureMiredsAttributeFromDut_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads ColorTemperatureMireds attribute from DUT.\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDut_6(); + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends StepColorTemperature command to DUT with MoveMode = Up\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : Wait 500ms\n"); + err = TestWait500ms_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")) { NextTest(); return; } - err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 500ms\n"); - err = TestWait500ms_8(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 500ms\n"); + err = TestWait500ms_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")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 500ms\n"); - err = TestWait500ms_10(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 700ms\n"); + err = TestWait700ms_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")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 700ms\n"); - err = TestWait700ms_12(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); + if (ShouldSkip("CC.S.F04 && CC.S.C4c.Rsp")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13(); + err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends StepColorTemperature command to DUT with MoveMode = Down\n"); - if (ShouldSkip("CC.S.F04 && CC.S.C4C.Rsp")) { - NextTest(); - return; - } - err = TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 500ms\n"); + err = TestWait500ms_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 500ms\n"); - err = TestWait500ms_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + 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")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); - err = TestWait500ms_17(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 500ms\n"); + err = TestWait500ms_16(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + 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")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); - err = TestWait500ms_19(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 500ms\n"); + err = TestWait500ms_18(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads ColorTemperatureMireds attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F04 && CC.S.A0007 && CC.S.C4C.Rsp")) { + 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")) { NextTest(); return; } - err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20(); + err = TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_19(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Turn off light that we turned on\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Turn off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_21(); + err = TestTurnOffLightThatWeTurnedOn_20(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : Check on/off attribute value is false after off command\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21(); break; } @@ -12997,9 +15957,6 @@ class Test_TC_CC_6_3 : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -13013,7 +15970,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -13027,69 +15984,47 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); + id optionsArgument; + optionsArgument = [NSNumber numberWithUnsignedChar:0U]; + [cluster writeAttributeOptionsWithValue:optionsArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH writes 0 to the Options attribute Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR TestThSendsOnCommandToDut_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); + [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("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; - } NSNumber * _Nonnull ColorTempPhysicalMinMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_4() + CHIP_ERROR TestThReadsColorTempPhysicalMinMiredsAttributeFromDut_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13117,7 +16052,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { } NSNumber * _Nonnull ColorTempPhysicalMaxMiredsValue; - CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_5() + CHIP_ERROR TestThReadsColorTempPhysicalMaxMiredsAttributeFromDut_4() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13144,7 +16079,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_6() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13169,7 +16104,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_7() + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeUp_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13197,14 +16132,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_8() + CHIP_ERROR TestWait500ms_7() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_9() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13227,14 +16162,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_10() + CHIP_ERROR TestWait500ms_9() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_11() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13257,14 +16192,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait700ms_12() + CHIP_ERROR TestWait700ms_11() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 700UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13287,7 +16222,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_14() + CHIP_ERROR TestThSendsStepColorTemperatureCommandToDutWithMoveModeDown_13() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13315,14 +16250,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_15() + CHIP_ERROR TestWait500ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_16() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13345,14 +16280,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_17() + CHIP_ERROR TestWait500ms_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_18() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13375,14 +16310,14 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_19() + CHIP_ERROR TestWait500ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 500UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_20() + CHIP_ERROR TestThReadsColorTemperatureMiredsAttributeFromDutSeveralTimes_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13405,7 +16340,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_21() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13422,7 +16357,7 @@ class Test_TC_CC_6_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_22() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -13455,7 +16390,6 @@ class Test_TC_CC_7_2 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("RateConfigValue", 0, UINT16_MAX, &mRateConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -13489,196 +16423,212 @@ class Test_TC_CC_7_2 : 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.F01 && 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.F01 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : 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 = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue20000Direction0x00ShortestDistanceAndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { - NextTest(); - return; - } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedMoveHue command to DUT with MoveMode Up\n"); + ChipLogProgress(chipTool, + " ***** Test Step 5 : 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 = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x01UpAndRate500UnitsS_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 1000ms\n"); - err = TestWait1000ms_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 1000ms\n"); - err = TestWait1000ms_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 10s\n"); + err = TestWait10s_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 11 : TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 2s\n"); + err = TestWait2s_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 1000ms\n"); - err = TestWait1000ms_14(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 15 : TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, Direction=0x00 (shortest " + "distance) and TransitionTime=0 (immediately).\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C40.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15(); + err = TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue25000Direction0x00ShortestDistanceAndTransitionTime0Immediately_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends EnhancedMoveHue command to DUT with MoveMode Down\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 100ms\n"); + err = TestWait100ms_16(); + break; + case 17: + ChipLogProgress(chipTool, + " ***** Test Step 17 : TH sends EnhancedMoveHue command to DUT with MoveMode=0x03 (down) and Rate=500 (units/s)\n"); if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 500ms\n"); - err = TestWait500ms_17(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x03DownAndRate500UnitsS_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { - NextTest(); - return; - } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10s\n"); + err = TestWait10s_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 500ms\n"); - err = TestWait500ms_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_19(); break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 500ms\n"); - err = TestWait500ms_21(); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 10s\n"); + err = TestWait10s_20(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads EnhancedCurrentHue attribute from DUT several times\n"); + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : Wait 10s\n"); + err = TestWait10s_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends EnhancedMoveHue command to DUT with MoveMode Stop\n"); + ChipLogProgress(chipTool, + " ***** Test Step 23 : TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)\n"); if (ShouldSkip("CC.S.F01 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23(); + err = TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 1000ms\n"); - err = TestWait1000ms_25(); + ChipLogProgress(chipTool, " ***** Test Step 25 : Wait 2s\n"); + err = TestWait2s_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads EnhancedCurrentHue attribute from DUT several times.\n"); + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Turn off light that we turned on\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_27(); + err = TestThReadsColorModeAttributeFromDut_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : Check on/off attribute value is false after off command\n"); + ChipLogProgress(chipTool, " ***** Test Step 28 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Turn Off light that we turned on\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestTurnOffLightThatWeTurnedOn_29(); + break; + case 30: + ChipLogProgress(chipTool, " ***** Test Step 30 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30(); break; } @@ -13778,6 +16728,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 29: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 30: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -13791,12 +16747,11 @@ class Test_TC_CC_7_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 29; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mRateConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -13806,46 +16761,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster onWithCompletionHandler:^(NSError * _Nullable err) { - NSLog(@"Turn on light for color control tests Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() - { - 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() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13867,30 +16783,25 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() + 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 readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue 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)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeUp_5() + CHIP_ERROR + TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue20000Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13898,32 +16809,34 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:1U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:50U]; + __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 with MoveMode Up 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 TestWait1000ms_6() + CHIP_ERROR TestWait100ms_4() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_7() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x01UpAndRate500UnitsS_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13931,29 +16844,33 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); - - 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 TestWait1000ms_8() + CHIP_ERROR TestWait10s_6() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_9() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13962,13 +16879,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 22500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 27500U)); NextTest(); }]; @@ -13976,14 +16892,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_10() + CHIP_ERROR TestWait10s_8() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_11() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -13992,13 +16908,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 27500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 32500U)); NextTest(); }]; @@ -14006,7 +16921,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_12() + CHIP_ERROR TestWait10s_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14016,23 +16938,24 @@ class Test_TC_CC_7_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:0U]; + params.rate = [NSNumber numberWithUnsignedShort:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Stop Error: %@", err); + [cluster + enhancedMoveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull EnhancedCurrentHueStep3b; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_13() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14041,16 +16964,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - { - EnhancedCurrentHueStep3b = value; - } + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 34000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 36000U)); NextTest(); }]; @@ -14058,14 +16977,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_14() + CHIP_ERROR TestWait2s_13() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_15() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_14() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14074,18 +16993,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep3b)); - } - - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 34500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 36000U)); NextTest(); }]; @@ -14093,7 +17006,8 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeDown_16() + CHIP_ERROR + TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue25000Direction0x00ShortestDistanceAndTransitionTime0Immediately_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14101,32 +17015,34 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.moveMode = [NSNumber numberWithUnsignedChar:3U]; - params.rate = mRateConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mRateConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:50U]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.enhancedHue = [NSNumber numberWithUnsignedShort:25000U]; + 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 with MoveMode Down Error: %@", err); + [cluster enhancedMoveToHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=25000, 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 TestWait500ms_17() + CHIP_ERROR TestWait100ms_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 100UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_18() + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x03DownAndRate500UnitsS_17() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14134,29 +17050,33 @@ class Test_TC_CC_7_2 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.moveMode = [NSNumber numberWithUnsignedChar:3U]; + 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=0x03 (down) 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 TestWait500ms_19() + CHIP_ERROR TestWait10s_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_20() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14165,13 +17085,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 17500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 22500U)); NextTest(); }]; @@ -14179,14 +17098,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait500ms_21() + CHIP_ERROR TestWait10s_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 500UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_22() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14195,13 +17114,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 12500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 17500U)); NextTest(); }]; @@ -14209,7 +17127,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveModeStop_23() + CHIP_ERROR TestWait10s_22() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsEnhancedMoveHueCommandToDutWithMoveMode0x00StopAndRate5UnitsS_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14219,23 +17144,24 @@ class Test_TC_CC_7_2 : public TestCommandBridge { __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; params.moveMode = [NSNumber numberWithUnsignedChar:0U]; - params.rate = [NSNumber numberWithUnsignedShort:0U]; + params.rate = [NSNumber numberWithUnsignedShort:5U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode Stop Error: %@", err); + [cluster + enhancedMoveHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s) Error: %@", + err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - NSNumber * _Nonnull EnhancedCurrentHueStep5b; - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_24() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14244,16 +17170,12 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); - { - EnhancedCurrentHueStep5b = value; - } + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 9500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 12500U)); NextTest(); }]; @@ -14261,14 +17183,14 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_25() + CHIP_ERROR TestWait2s_25() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 2000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDutSeveralTimes_26() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14277,18 +17199,34 @@ class Test_TC_CC_7_2 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads EnhancedCurrentHue attribute from DUT several times. Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, EnhancedCurrentHueStep5b)); - } + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 9500U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 12500U)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_27() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); NextTest(); }]; @@ -14296,14 +17234,36 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_27() + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_28() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_29() { 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)); @@ -14313,7 +17273,7 @@ class Test_TC_CC_7_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_30() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -14346,7 +17306,6 @@ class Test_TC_CC_7_3 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("StepSizeConfigValue", 0, UINT16_MAX, &mStepSizeConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -14380,92 +17339,196 @@ class Test_TC_CC_7_3 : 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.F01 && 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.F01 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest " + "distance) and TransitionTime=0 (immediately).\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C40.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue6000Direction0x00ShortestDistanceAndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { - NextTest(); - return; - } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedStepHue command to DUT with StepMode Up\n"); + ChipLogProgress(chipTool, + " ***** Test Step 5 : TH sends EnhancedStepHue command to DUT with StepMode=0x01 (up), StepSize=6000 and " + "TransitionTime=300 (30s).\n"); if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5(); + err = TestThSendsEnhancedStepHueCommandToDutWithStepMode0x01UpStepSize6000AndTransitionTime30030s_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1000ms\n"); - err = TestWait1000ms_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 10s\n"); + err = TestWait10s_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends EnhancedStepHue command to DUT with StepMode Down\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : Wait 10s\n"); + err = TestWait10s_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 5s\n"); + err = TestWait5s_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest " + "distance) and TransitionTime=0 (immediately).\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C40.Rsp")) { + NextTest(); + return; + } + err = TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue12000Direction0x00ShortestDistanceAndTransitionTime0Immediately_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 100ms\n"); + err = TestWait100ms_15(); + break; + case 16: + ChipLogProgress(chipTool, + " ***** Test Step 16 : TH sends EnhancedStepHue command to DUT with StepMode=0x03 (down), StepSize=6000 and " + "TransitionTime=300 (30s)\n"); if (ShouldSkip("CC.S.F01 && CC.S.C42.Rsp")) { NextTest(); return; } - err = TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8(); + err = TestThSendsEnhancedStepHueCommandToDutWithStepMode0x03DownStepSize6000AndTransitionTime30030s_16(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Wait 1000ms\n"); - err = TestWait1000ms_9(); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 10s\n"); + err = TestWait10s_17(); break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Over TransitionTime,Read EnhancedCurrentHue attribute from DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C42.Rsp")) { + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { NextTest(); return; } - err = TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_18(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Turn off light that we turned on\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 10s\n"); + err = TestWait10s_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Wait 10s\n"); + err = TestWait10s_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_22(); + break; + case 23: + ChipLogProgress(chipTool, " ***** Test Step 23 : Wait 5s\n"); + err = TestWait5s_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C41.Rsp")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_25(); + break; + case 26: + ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_26(); + break; + case 27: + ChipLogProgress(chipTool, " ***** Test Step 27 : Turn Off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_11(); + err = TestTurnOffLightThatWeTurnedOn_27(); break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Check on/off attribute value is false after off command\n"); + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28(); break; } @@ -14517,6 +17580,54 @@ class Test_TC_CC_7_3 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 23: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 24: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 25: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 26: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 27: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 28: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -14530,12 +17641,11 @@ class Test_TC_CC_7_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 29; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mStepSizeConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -14545,46 +17655,264 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() { 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); + [cluster onWithCompletionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends On command to DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR + TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue6000Direction0x00ShortestDistanceAndTransitionTime0Immediately_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.enhancedHue = [NSNumber numberWithUnsignedShort:6000U]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster enhancedMoveToHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=6000, Direction=0x00 (shortest " + @"distance) and TransitionTime=0 (immediately). Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepMode0x01UpStepSize6000AndTransitionTime30030s_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:1U]; + params.stepSize = [NSNumber numberWithUnsignedShort:6000U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster enhancedStepHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x01 (up), StepSize=6000 and " + @"TransitionTime=300 (30s). Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_6() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 7000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 9000U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_8() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_9() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 9000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 11000U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_10() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_11() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 11000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 12000U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait5s_12() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_13() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 12000U)); + } + NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR + TestThSendsEnhancedMoveToHueCommandToDutWithEnhancedHue12000Direction0x00ShortestDistanceAndTransitionTime0Immediately_14() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.enhancedHue = [NSNumber numberWithUnsignedShort:12000U]; + params.direction = [NSNumber numberWithUnsignedChar:0U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster enhancedMoveToHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHue command to DUT with EnhancedHue=12000, Direction=0x00 (shortest " + @"distance) and TransitionTime=0 (immediately). Error: %@", + err); - { - id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); - } + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestWait100ms_15() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepMode0x03DownStepSize6000AndTransitionTime30030s_16() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14592,21 +17920,34 @@ class Test_TC_CC_7_3 : public TestCommandBridge { 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); + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.stepMode = [NSNumber numberWithUnsignedChar:3U]; + params.stepSize = [NSNumber numberWithUnsignedShort:6000U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster enhancedStepHueWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode=0x03 (down), StepSize=6000 and " + @"TransitionTime=300 (30s) 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_4() + CHIP_ERROR TestWait10s_17() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14619,9 +17960,8 @@ class Test_TC_CC_7_3 : 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], 9000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 11000U)); NextTest(); }]; @@ -14629,7 +17969,14 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeUp_5() + CHIP_ERROR TestWait10s_19() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14637,33 +17984,28 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:0U]; - params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mStepSizeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedStepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode Up Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 7000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 9000U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_6() + CHIP_ERROR TestWait10s_21() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; + value.ms = 10000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_7() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14672,13 +18014,12 @@ class Test_TC_CC_7_3 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read EnhancedCurrentHue attribute from DUT Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 6000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 7000U)); NextTest(); }]; @@ -14686,7 +18027,14 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedStepHueCommandToDutWithStepModeDown_8() + CHIP_ERROR TestWait5s_23() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 5000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14694,33 +18042,45 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.stepMode = [NSNumber numberWithUnsignedChar:1U]; - params.stepSize = mStepSizeConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mStepSizeConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:50U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedStepHueWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedStepHue command to DUT with StepMode Down Error: %@", err); + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 6000U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1000ms_9() + CHIP_ERROR TestThReadsColorModeAttributeFromDut_25() { - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1000UL; - return WaitForMs("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } - CHIP_ERROR TestOverTransitionTimeReadEnhancedCurrentHueAttributeFromDut_10() + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_26() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -14728,14 +18088,13 @@ class Test_TC_CC_7_3 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Over TransitionTime,Read EnhancedCurrentHue attribute from DUT Error: %@", err); + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -14743,14 +18102,14 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_11() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_27() { 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)); @@ -14760,7 +18119,7 @@ class Test_TC_CC_7_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_12() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_28() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -14793,8 +18152,6 @@ class Test_TC_CC_7_4 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("EnhancedHueConfigValue", 0, UINT16_MAX, &mEnhancedHueConfigValue); - AddArgument("SaturationConfigValue", 0, UINT8_MAX, &mSaturationConfigValue); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -14828,73 +18185,152 @@ class Test_TC_CC_7_4 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Turn on light for color control tests\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 1 : TH writes 0 to the Options attribute\n"); + if (ShouldSkip("CC.S.F01 && 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.F01 && CC.S.A000f")) { + ChipLogProgress(chipTool, + " ***** Test Step 3 : TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=20000, Saturation=50 " + "and TransitionTime=0 (immediately)\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_3(); + err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDutWithEnhancedHue20000Saturation50AndTransitionTime0Immediately_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads EnhancedCurrentHue attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 4 : Wait 100ms\n"); + err = TestWait100ms_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads EnhancedCurrentHue attribute from DUT\n"); if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { NextTest(); return; } - err = TestThReadsEnhancedCurrentHueAttributeFromDut_4(); + err = TestThReadsEnhancedCurrentHueAttributeFromDut_5(); break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends EnhancedMoveToHueAndSaturation command to DUT\n"); - if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { NextTest(); return; } - err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Wait 1500ms\n"); - err = TestWait1500ms_6(); + err = TestThReadsCurrentSaturationAttributeFromDut_6(); break; case 7: ChipLogProgress(chipTool, - " ***** Test Step 7 : Check EnhancedCurrentHue attribute value matched the value sent by the last command\n"); - if (ShouldSkip("CC.S.F01 && CC.S.A4000 && CC.S.C43.Rsp")) { + " ***** Test Step 7 : TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=16000, Saturation=80 " + "and TransitionTime=200 (20s)\n"); + if (ShouldSkip("CC.S.F01 && CC.S.C43.Rsp")) { NextTest(); return; } - err = TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7(); + err = TestThSendsEnhancedMoveToHueAndSaturationCommandToDutWithEnhancedHue16000Saturation80AndTransitionTime20020s_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Turn off light that we turned on\n"); + ChipLogProgress(chipTool, " ***** Test Step 8 : Wait 10s\n"); + err = TestWait10s_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : Wait 10s\n"); + err = TestWait10s_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 5s\n"); + err = TestWait5s_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads EnhancedCurrentHue attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A4000")) { + NextTest(); + return; + } + err = TestThReadsEnhancedCurrentHueAttributeFromDut_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentSaturation attribute from DUT\n"); + if (ShouldSkip("CC.S.F01 && CC.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsCurrentSaturationAttributeFromDut_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads ColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A0008")) { + NextTest(); + return; + } + err = TestThReadsColorModeAttributeFromDut_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads EnhancedColorMode attribute from DUT\n"); + if (ShouldSkip("CC.S.F00 && CC.S.A4001")) { + NextTest(); + return; + } + err = TestThReadsEnhancedColorModeAttributeFromDut_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : Turn Off light that we turned on\n"); if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestTurnOffLightThatWeTurnedOn_8(); + err = TestTurnOffLightThatWeTurnedOn_19(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Check on/off attribute value is false after off command\n"); + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Check on/off attribute value is false after off command\n"); if (ShouldSkip("OO.S.A0000")) { NextTest(); return; } - err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9(); + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20(); break; } @@ -14937,6 +18373,39 @@ class Test_TC_CC_7_4 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -14950,13 +18419,11 @@ class Test_TC_CC_7_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 21; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mEnhancedHueConfigValue; - chip::Optional mSaturationConfigValue; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -14966,14 +18433,36 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestTurnOnLightForColorControlTests_1() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_1() + { + 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 TestThSendsOnCommandToDut_2() { 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); + NSLog(@"TH sends On command to DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -14983,20 +18472,58 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsTrueAfterOnCommand_2() + CHIP_ERROR + TestThSendsEnhancedMoveToHueAndSaturationCommandToDutWithEnhancedHue20000Saturation50AndTransitionTime0Immediately_3() { MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeOnOffWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check on/off attribute value is true after on command Error: %@", err); + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + params.enhancedHue = [NSNumber numberWithUnsignedShort:20000U]; + params.saturation = [NSNumber numberWithUnsignedChar:50U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster enhancedMoveToHueAndSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=20000, " + @"Saturation=50 and TransitionTime=0 (immediately) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait100ms_4() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_5() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("OnOff", actualValue, 1)); + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 20000U)); } NextTest(); @@ -15005,7 +18532,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_3() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15013,21 +18540,58 @@ class Test_TC_CC_7_4 : public TestCommandBridge { 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); + [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(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 50U)); + } + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_4() + CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDutWithEnhancedHue16000Saturation80AndTransitionTime20020s_7() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + params.enhancedHue = [NSNumber numberWithUnsignedShort:16000U]; + params.saturation = [NSNumber numberWithUnsignedChar:80U]; + params.transitionTime = [NSNumber numberWithUnsignedShort:200U]; + params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; + [cluster enhancedMoveToHueAndSaturationWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to DUT with EnhancedHue=16000, " + @"Saturation=80 and TransitionTime=200 (20s) Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_8() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15041,8 +18605,8 @@ class Test_TC_CC_7_4 : 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], 17000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 19000U)); NextTest(); }]; @@ -15050,7 +18614,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsEnhancedMoveToHueAndSaturationCommandToDut_5() + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15058,34 +18622,80 @@ class Test_TC_CC_7_4 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.enhancedHue = mEnhancedHueConfigValue.HasValue() ? [NSNumber numberWithUnsignedShort:mEnhancedHueConfigValue.Value()] - : [NSNumber numberWithUnsignedShort:1200U]; - params.saturation = mSaturationConfigValue.HasValue() ? [NSNumber numberWithUnsignedChar:mSaturationConfigValue.Value()] - : [NSNumber numberWithUnsignedChar:90U]; - params.transitionTime = [NSNumber numberWithUnsignedShort:10U]; - params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; - [cluster enhancedMoveToHueAndSaturationWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends EnhancedMoveToHueAndSaturation command to 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(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 56U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 74U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWait10s_11() + { + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs("alpha", value); + } + + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_12() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 16000U)); + VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 17000U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_13() + { + 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(CheckConstraintMinValue("currentSaturation", [value unsignedCharValue], 68U)); + VerifyOrReturn(CheckConstraintMaxValue("currentSaturation", [value unsignedCharValue], 80U)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestWait1500ms_6() + CHIP_ERROR TestWait5s_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 1500UL; + value.ms = 5000UL; return WaitForMs("alpha", value); } - CHIP_ERROR TestCheckEnhancedCurrentHueAttributeValueMatchedTheValueSentByTheLastCommand_7() + CHIP_ERROR TestThReadsEnhancedCurrentHueAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device @@ -15094,19 +18704,82 @@ class Test_TC_CC_7_4 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeEnhancedCurrentHueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Check EnhancedCurrentHue attribute value matched the value sent by the last command Error: %@", err); + NSLog(@"TH reads EnhancedCurrentHue attribute from DUT Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); { id actualValue = value; - VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, - mEnhancedHueConfigValue.HasValue() ? mEnhancedHueConfigValue.Value() : 1200U)); + VerifyOrReturn(CheckValue("EnhancedCurrentHue", actualValue, 16000U)); } - VerifyOrReturn(CheckConstraintType("enhancedCurrentHue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("enhancedCurrentHue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("enhancedCurrentHue", [value unsignedShortValue], 65535U)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsCurrentSaturationAttributeFromDut_16() + { + 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)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("CurrentSaturation", actualValue, 80U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsColorModeAttributeFromDut_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads ColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 2U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsEnhancedColorModeAttributeFromDut_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterColorControl * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeColorModeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads EnhancedColorMode attribute from DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("colorMode", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("colorMode", [value unsignedCharValue], 3U)); NextTest(); }]; @@ -15114,14 +18787,14 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTurnOffLightThatWeTurnedOn_8() + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_19() { 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)); @@ -15131,7 +18804,7 @@ class Test_TC_CC_7_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_9() + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterOnOff * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -15387,7 +19060,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { break; case 26: ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends MoveColorTemperature command to DUT\n"); - if (ShouldSkip("CC.S.C4B.Rsp && CC.S.F04")) { + if (ShouldSkip("CC.S.C4b.Rsp && CC.S.F04")) { NextTest(); return; } @@ -15399,7 +19072,7 @@ class Test_TC_CC_8_1 : public TestCommandBridge { 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")) { + if (ShouldSkip("CC.S.A0007 && CC.S.C4b.Rsp && CC.S.F04")) { NextTest(); return; } @@ -16732,16 +20405,6 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -16771,9 +20434,6 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -16787,7 +20447,7 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -16930,15 +20590,6 @@ class Test_TC_DESC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_DGETH_2_1 : public TestCommandBridge { @@ -18335,16 +21986,6 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -18377,9 +22018,6 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -18393,7 +22031,7 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -18557,15 +22195,6 @@ class Test_TC_FLW_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_FLW_2_1 : public TestCommandBridge { @@ -18668,237 +22297,224 @@ class Test_TC_FLW_2_1 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - if (value != nil) { - - VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65535U)); - } - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsFromTheDutTheToleranceAttribute_4() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpoint:1 - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the Tolerance attribute Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); - VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CGEN_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_CGEN_1_1() - : TestCommandBridge("Test_TC_CGEN_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_CGEN_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); - err = TestReadTheGlobalAttributeClusterRevision_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); - err = TestReadTheGlobalAttributeFeatureMap_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); - err = TestReadTheGlobalAttributeAttributeList_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); - err = TestReadTheGlobalAttributeAcceptedCommandList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); - err = TestReadTheGlobalAttributeGeneratedCommandList_5(); - break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 5; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestReadTheMandatoryAttributeMinMeasuredValue_1() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MinMeasuredValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("minMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("minMeasuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minMeasuredValue", [value unsignedShortValue], 65533U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheMandatoryAttributeMaxMeasuredValue_2() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MaxMeasuredValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("maxMeasuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("maxMeasuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxMeasuredValue", [value unsignedShortValue], 65534U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheMandatoryAttributeMeasuredValue_3() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMeasuredValueWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the mandatory attribute: MeasuredValue Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + if (value != nil) { + + VerifyOrReturn(CheckConstraintType("measuredValue", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("measuredValue", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("measuredValue", [value unsignedShortValue], 65535U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsFromTheDutTheToleranceAttribute_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterFlowMeasurement * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpoint:1 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeToleranceWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the Tolerance attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("tolerance", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("tolerance", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("tolerance", [value unsignedShortValue], 2048U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CGEN_1_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_CGEN_1_1() + : TestCommandBridge("Test_TC_CGEN_1_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_CGEN_1_1() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_CGEN_1_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_CGEN_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute: FeatureMap\n"); + err = TestReadTheGlobalAttributeFeatureMap_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Read the global attribute: AttributeList\n"); + err = TestReadTheGlobalAttributeAttributeList_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read the global attribute: AcceptedCommandList\n"); + err = TestReadTheGlobalAttributeAcceptedCommandList_4(); + break; case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); + err = TestReadTheGlobalAttributeGeneratedCommandList_5(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; } @@ -18914,7 +22530,7 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -19056,15 +22672,6 @@ class Test_TC_CGEN_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_CGEN_2_1 : public TestCommandBridge { @@ -20182,16 +23789,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { } err = TestReadTheOptionalAttributeIdentifyQueryResponseInGeneratedCommandList_9(); break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_10(); - break; } if (CHIP_NO_ERROR != err) { @@ -20233,9 +23830,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -20249,7 +23843,7 @@ class Test_TC_I_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -20464,15 +24058,6 @@ class Test_TC_I_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_10() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_I_2_1 : public TestCommandBridge { @@ -21727,16 +25312,6 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_7(); break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_8(); - break; } if (CHIP_NO_ERROR != err) { @@ -21772,9 +25347,6 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -21788,7 +25360,7 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -21967,15 +25539,6 @@ class Test_TC_ILL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_8() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_ILL_2_1 : public TestCommandBridge { @@ -22381,16 +25944,6 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 14 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_14(); break; - case 15: - ChipLogProgress(chipTool, - " ***** Test Step 15 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_15(); - break; } if (CHIP_NO_ERROR != err) { @@ -22447,9 +26000,6 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -22463,7 +26013,7 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 16; + const uint16_t mTestCount = 15; chip::Optional mNodeId; chip::Optional mCluster; @@ -22803,15 +26353,6 @@ class Test_TC_LVL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_15() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_LVL_2_1 : public TestCommandBridge { @@ -28270,16 +31811,6 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -28309,9 +31840,6 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -28325,7 +31853,7 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -28459,15 +31987,6 @@ class Test_TC_LOWPOWER_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { @@ -28536,16 +32055,6 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -28575,9 +32084,6 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -28591,7 +32097,7 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -28722,15 +32228,6 @@ class Test_TC_KEYPADINPUT_1_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { @@ -28823,16 +32320,6 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); - break; } if (CHIP_NO_ERROR != err) { @@ -28871,9 +32358,6 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -28887,7 +32371,7 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -29091,15 +32575,6 @@ class Test_TC_APPLAUNCHER_1_3 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { @@ -29180,16 +32655,6 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 7 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_7(); break; - case 8: - ChipLogProgress(chipTool, - " ***** Test Step 8 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_8(); - break; } if (CHIP_NO_ERROR != err) { @@ -29225,9 +32690,6 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -29241,7 +32703,7 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 9; + const uint16_t mTestCount = 8; chip::Optional mNodeId; chip::Optional mCluster; @@ -29422,15 +32884,6 @@ class Test_TC_MEDIAINPUT_1_4 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_8() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { @@ -29503,16 +32956,6 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -29545,9 +32988,6 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -29561,7 +33001,7 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -29710,15 +33150,6 @@ class Test_TC_WAKEONLAN_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_CHANNEL_1_6 : public TestCommandBridge { @@ -29836,16 +33267,6 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { } err = TestReadTheGlobalAttributeGeneratedCommandList_10(); break; - case 11: - ChipLogProgress(chipTool, - " ***** Test Step 11 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_11(); - break; } if (CHIP_NO_ERROR != err) { @@ -29890,9 +33311,6 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -29906,7 +33324,7 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 12; + const uint16_t mTestCount = 11; chip::Optional mNodeId; chip::Optional mCluster; @@ -30127,15 +33545,6 @@ class Test_TC_CHANNEL_1_6 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_11() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { @@ -30316,16 +33725,6 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 19 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_19(); break; - case 20: - ChipLogProgress(chipTool, - " ***** Test Step 20 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_20(); - break; } if (CHIP_NO_ERROR != err) { @@ -30397,9 +33796,6 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -30413,7 +33809,7 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 21; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -30855,15 +34251,6 @@ class Test_TC_MEDIAPLAYBACK_1_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_20() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { @@ -30940,16 +34327,6 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { } err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -30982,9 +34359,6 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -30998,7 +34372,7 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -31160,15 +34534,6 @@ class Test_TC_AUDIOOUTPUT_1_8 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TGTNAV_1_9 : public TestCommandBridge { @@ -31241,16 +34606,6 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -31283,9 +34638,6 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -31299,7 +34651,7 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -31455,15 +34807,6 @@ class Test_TC_TGTNAV_1_9 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_APBSC_1_10 : public TestCommandBridge { @@ -31552,16 +34895,6 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); - break; } if (CHIP_NO_ERROR != err) { @@ -31600,9 +34933,6 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -31616,7 +34946,7 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -31826,15 +35156,6 @@ class Test_TC_APBSC_1_10 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { @@ -31934,16 +35255,6 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); - break; } if (CHIP_NO_ERROR != err) { @@ -31982,9 +35293,6 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -31998,7 +35306,7 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -32195,15 +35503,6 @@ class Test_TC_CONTENTLAUNCHER_1_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_ALOGIN_1_12 : public TestCommandBridge { @@ -32268,16 +35567,6 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -32307,9 +35596,6 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -32323,7 +35609,7 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -32458,15 +35744,6 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_LOWPOWER_2_1 : public TestCommandBridge { @@ -37849,16 +41126,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); - break; } if (CHIP_NO_ERROR != err) { @@ -37897,9 +41164,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -37913,7 +41177,7 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -38122,15 +41386,6 @@ class Test_TC_MOD_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class OTA_SuccessfulTransfer : public TestCommandBridge { @@ -38520,16 +41775,6 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -38559,9 +41804,6 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -38575,7 +41817,7 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -38717,15 +41959,6 @@ class Test_TC_OCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_OCC_2_1 : public TestCommandBridge { @@ -39337,16 +42570,6 @@ class Test_TC_OO_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 8 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_8(); break; - case 9: - ChipLogProgress(chipTool, - " ***** Test Step 9 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9(); - break; } if (CHIP_NO_ERROR != err) { @@ -39385,9 +42608,6 @@ class Test_TC_OO_1_1 : public TestCommandBridge { case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -39401,7 +42621,7 @@ class Test_TC_OO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 10; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -39598,15 +42818,6 @@ class Test_TC_OO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_9() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_OO_2_1 : public TestCommandBridge { @@ -41429,16 +44640,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 9 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_9(); break; - case 10: - ChipLogProgress(chipTool, - " ***** Test Step 10 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_10(); - break; } if (CHIP_NO_ERROR != err) { @@ -41480,9 +44681,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -41496,7 +44694,7 @@ class Test_TC_PS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 11; + const uint16_t mTestCount = 10; chip::Optional mNodeId; chip::Optional mCluster; @@ -41728,15 +44926,6 @@ class Test_TC_PS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_10() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_PS_2_1 : public TestCommandBridge { @@ -43007,16 +46196,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 12 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_12(); break; - case 13: - ChipLogProgress(chipTool, - " ***** Test Step 13 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_13(); - break; } if (CHIP_NO_ERROR != err) { @@ -43067,9 +46246,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -43083,7 +46259,7 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 14; + const uint16_t mTestCount = 13; chip::Optional mNodeId; chip::Optional mCluster; @@ -43382,15 +46558,6 @@ class Test_TC_PRS_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_13() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_PRS_2_1 : public TestCommandBridge { @@ -44009,14 +47176,6 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the GeneratedCommandList attribute from the DUT\n"); err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_21(); break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads the EventList attribute from the DUT\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestThReadsTheEventListAttributeFromTheDut_22(); - break; } if (CHIP_NO_ERROR != err) { @@ -44094,9 +47253,6 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -44110,7 +47266,7 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 23; + const uint16_t mTestCount = 22; chip::Optional mNodeId; chip::Optional mCluster; @@ -44587,15 +47743,6 @@ class Test_TC_PCC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestThReadsTheEventListAttributeFromTheDut_22() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_PCC_2_1 : public TestCommandBridge { @@ -46940,16 +50087,6 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads the GeneratedCommandList attribute from the DUT\n"); err = TestThReadsTheGeneratedCommandListAttributeFromTheDut_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -46979,9 +50116,6 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -46995,7 +50129,7 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -47130,15 +50264,6 @@ class Test_TC_PSCFG_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_RH_1_1 : public TestCommandBridge { @@ -47211,16 +50336,6 @@ class Test_TC_RH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -47253,9 +50368,6 @@ class Test_TC_RH_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -47269,7 +50381,7 @@ class Test_TC_RH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -47427,15 +50539,6 @@ class Test_TC_RH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_RH_2_1 : public TestCommandBridge { @@ -47778,16 +50881,6 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 11 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_11(); break; - case 12: - ChipLogProgress(chipTool, - " ***** Test Step 12 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12(); - break; } if (CHIP_NO_ERROR != err) { @@ -47835,9 +50928,6 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -47851,7 +50941,7 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 13; + const uint16_t mTestCount = 12; chip::Optional mNodeId; chip::Optional mCluster; @@ -48060,15 +51150,6 @@ class Test_TC_SWTCH_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_12() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TMP_1_1 : public TestCommandBridge { @@ -48141,16 +51222,6 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : Read GeneratedCommandList attribute from the DUT\n"); err = TestReadGeneratedCommandListAttributeFromTheDut_6(); break; - case 7: - ChipLogProgress(chipTool, - " ***** Test Step 7 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7(); - break; } if (CHIP_NO_ERROR != err) { @@ -48183,9 +51254,6 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -48199,7 +51267,7 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 8; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -48357,15 +51425,6 @@ class Test_TC_TMP_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_7() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TMP_2_1 : public TestCommandBridge { @@ -54836,16 +57895,6 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -54875,9 +57924,6 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -54891,7 +57937,7 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -55028,15 +58074,6 @@ class Test_TC_TSUIC_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_TSUIC_2_1 : public TestCommandBridge { @@ -56453,16 +59490,6 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 5 : Read the global attribute: GeneratedCommandList\n"); err = TestReadTheGlobalAttributeGeneratedCommandList_5(); break; - case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read EventList attribute from the DUT and Verify that the DUT response provides a list of " - "supported events.\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { - NextTest(); - return; - } - err = TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6(); - break; } if (CHIP_NO_ERROR != err) { @@ -56492,9 +59519,6 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -56508,7 +59532,7 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 7; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; @@ -56638,15 +59662,6 @@ class Test_TC_ULABEL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestReadEventListAttributeFromTheDutAndVerifyThatTheDutResponseProvidesAListOfSupportedEvents_6() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_ULABEL_2_2 : public TestCommandBridge { @@ -58190,64 +61205,67 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { err = TestReadTheFeatureDependentWNCVSF00Wncvsf02Wncvsf03AttributeInAttributeList_5(); break; case 6: - ChipLogProgress(chipTool, - " ***** Test Step 6 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in " - "AttributeList\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb")) { + ChipLogProgress( + chipTool, " ***** Test Step 6 : Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList\n"); + if (ShouldSkip("WNCV.S.F00 && WNCV.S.F02 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_6(); + err = TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the Feature dependent(WNCV.S.F00) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.Afffb")) { + ChipLogProgress(chipTool, + " ***** Test Step 7 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in " + "AttributeList\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.F03 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestReadTheFeatureDependentWNCVSF00AttributeInAttributeList_7(); + err = TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Read the Feature dependent(WNCV.S.F00) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.Afffb")) { + ChipLogProgress( + chipTool, " ***** Test Step 8 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList\n"); + if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb")) { NextTest(); return; } - err = TestReadTheFeatureDependentWNCVSF00AttributeInAttributeList_8(); + err = TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the Feature dependent(WNCV.S.F01) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.Afffb")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute\n"); + if (ShouldSkip("WNCV.S.Afff9")) { NextTest(); return; } - err = TestReadTheFeatureDependentWNCVSF01AttributeInAttributeList_9(); + err = TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_9(); break; case 10: ChipLogProgress(chipTool, - " ***** Test Step 10 : Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F00 && WNCV.S.F00 && WNCV.S.Afffb")) { + " ***** Test Step 10 : TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList\n"); + if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F00 && WNCV.S.F02")) { NextTest(); return; } - err = TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_10(); + err = TestThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList\n"); - if (ShouldSkip("WNCV.S.F01 && WNCV.S.F04 && WNCV.S.Afffb")) { + " ***** Test Step 11 : TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList\n"); + if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F03")) { NextTest(); return; } - err = TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_11(); + err = TestThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute\n"); - if (ShouldSkip("WNCV.S.Afff9")) { + ChipLogProgress(chipTool, + " ***** Test Step 12 : TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList\n"); + if (ShouldSkip("WNCV.S.Afff9 && WNCV.S.F01 && WNCV.S.F04")) { NextTest(); return; } - err = TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_12(); + err = TestThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads from the DUT the (0xFFF8) GeneratedCommandList attribute\n"); @@ -58257,14 +61275,6 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { } err = TestThReadsFromTheDutThe0xFFF8GeneratedCommandListAttribute_13(); break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads from the DUT the (0xFFFA) EventList attribute\n"); - if (ShouldSkip("PICS_USER_PROMPT && WNCV.S.Afffa")) { - NextTest(); - return; - } - err = TestThReadsFromTheDutThe0xFFFAEventListAttribute_14(); - break; } if (CHIP_NO_ERROR != err) { @@ -58318,9 +61328,6 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -58334,7 +61341,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 15; + const uint16_t mTestCount = 14; chip::Optional mNodeId; chip::Optional mCluster; @@ -58466,8 +61473,6 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 16UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); @@ -58477,7 +61482,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_6() + CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -58486,15 +61491,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); NextTest(); }]; @@ -58502,7 +61505,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentWNCVSF00AttributeInAttributeList_7() + CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04Wncvsf03AttributeInAttributeList_7() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -58511,12 +61514,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F00) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 & WNCV.S.F03) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 19UL)); NextTest(); }]; @@ -58524,7 +61528,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentWNCVSF00AttributeInAttributeList_8() + CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_8() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -58533,12 +61537,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F00) attribute in AttributeList Error: %@", err); + NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); NextTest(); }]; @@ -58546,7 +61551,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentWNCVSF01AttributeInAttributeList_9() + CHIP_ERROR TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_9() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -58554,13 +61559,15 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F01) attribute in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 6UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); NextTest(); }]; @@ -58568,7 +61575,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentWNCVSF00Wncvsf02AttributeInAttributeList_10() + CHIP_ERROR TestThReadsFeatureDependentWNCVSF00Wncvsf02CommandInAcceptedCommandList_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -58576,15 +61583,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F00 & WNCV.S.F02 ) attribute in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(WNCV.S.F00 & WNCV.S.F02) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 5UL)); NextTest(); }]; @@ -58592,7 +61597,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadTheFeatureDependentWNCVSF01Wncvsf04AttributeInAttributeList_11() + CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf03CommandInAcceptedCommandList_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -58600,15 +61605,13 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the Feature dependent(WNCV.S.F01 & WNCV.S.F04 ) attribute in AttributeList Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F03) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 7UL)); NextTest(); }]; @@ -58616,7 +61619,7 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsFromTheDutThe0xFFF9AcceptedCommandListAttribute_12() + CHIP_ERROR TestThReadsFeatureDependentWNCVSF01Wncvsf04CommandInAcceptedCommandList_12() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterWindowCovering * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device @@ -58625,14 +61628,12 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeAcceptedCommandListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads from the DUT the (0xFFF9) AcceptedCommandList attribute Error: %@", err); + NSLog(@"TH reads Feature dependent(WNCV.S.F01 & WNCV.S.F04) command in AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 8UL)); NextTest(); }]; @@ -58664,15 +61665,6 @@ class Test_TC_WNCV_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - - CHIP_ERROR TestThReadsFromTheDutThe0xFFFAEventListAttribute_14() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } }; class Test_TC_WNCV_2_1 : public TestCommandBridge {